Using dispatcher allows cancellation of ‘mirai’. In the case that the
‘mirai’ is awaiting execution, it is discarded from the queue and
never evaluated. In the case it is already in execution, an interrupt will be
sent.
A successful cancellation request does not guarantee successful cancellation:
the task, or a portion of it, may have already completed before the interrupt
is received. Even then, compiled code is not always interruptible. This
should be noted, particularly if the code carries out side effects during
execution, such as writing to files, etc.