WaitNext
This feature is not supported on the Wolfram Cloud.

WaitNext[{eid1,eid2,}]
waits until the first evaluation represented by any of the finishes, then returns its result, the corresponding , and the list of remaining .

DetailsDetails

  • The are EvaluationObject expressions obtained by submitting expressions for concurrent evaluation using ParallelSubmit.
  • WaitNext[{eid1,eid2,}] returns a list , where res is the result of the finished evaluation, eid is its EvaluationObject, and eids is the list of remaining evaluations.
  • The last element in the list produced by WaitNext is suitable for another call to WaitNext.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Submit a number of integer factorizations:

In[1]:=
Click for copyable input
Out[1]=

Wait until the fastest one is done:

In[2]:=
Click for copyable input
Out[2]=

Wait for the next one:

In[3]:=
Click for copyable input
Out[3]=

Finally, wait for all remaining ones:

In[4]:=
Click for copyable input
Out[4]=
Introduced in 2008
(7.0)