Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Interrogate the status of evaluation objects created with ParallelSubmit without waiting for the evaluations to complete
ResourceFunction["EvaluationObjectState"][obj] returns the current evaluation state of EvaluationObject obj. | |
ResourceFunction["EvaluationObjectState"][{obj1,obj2,…}] returns the current evaluation state for each of the obji. |
Submit a collection of parallel computations:
In[1]:= |
Out[1]= |
EvaluationObjectState will start the tasks and return their current states:
In[2]:= |
Out[2]= |
The dynamic display of the objects reflects these values:
In[3]:= |
Out[3]= |
After some time, you can see that some of the tasks have completed their evaluations:
In[4]:= |
Out[4]= |
Because there are "Finished" tasks, WaitNext will not block:
In[5]:= |
Out[5]= |
Eventually, all tasks will show as "Finished". Objects that have been returned by WaitNext or WaitAll will have a status of "Removed":
In[6]:= |
Out[6]= |
Create a non-blocking version of WaitNext:
In[7]:= |
This work is licensed under a Creative Commons Attribution 4.0 International License