LocalSubmit in the following generates a TaskObject. To extract the result one needs an explicit assignment to some var r'res via HandlerFunctions within LocalSubmit.

r`res = -1;
r`taskObject = 
 LocalSubmit[(Pause@2; 2), HandlerFunctionsKeys -> "EvaluationResult",
   HandlerFunctions -> <|
    "TaskFinished" -> ((r`res = #EvaluationResult) &)|>]

Is there any way to extract the result from the TaskObject itself rather than via explicit assignment?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.