According to the documentation, the following are true:

  1. The Exit[] command "terminates a Wolfram Language kernel session."
  2. The LocalSubmit[expr] command "submits a task to evaluate expr in a separate kernel."

Then, in theory, I should be able to do the following:

    (Pause[10]; "Hello, World!"),
    HandlerFunctions -> <|"TaskFinished" -> MessageDialog|>

and then, within 10 seconds, call


without interrupting the first computation. But all my experiments show that calling Exit[] results in the aborting of the first computation (even though it is expected to be running on a different kernel).

Is there a way to call the Exit[] command without affecting the LocalSubmit call? In short, is there a way to start a fire-and-forget call, and then continue working normally in a notebook without affecting the asynchronous call?

  • 1
    $\begingroup$ I think the separate kernel is still managed by the main kernel. It’s probably a subkernel instead of a stand-alone. $\endgroup$ – b3m2a1 Oct 13 '18 at 3:14
  • $\begingroup$ I guess so. I only wish the documentation had made it clearer. So, I suppose there is no way to issue an Exit[] command without interrupting a fire-and-forget call? $\endgroup$ – Shredderroy Oct 13 '18 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.