This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

WaitNext

WaitNext
waits until the first evaluation represented by any of the finishes, then returns its result, the corresponding , and the list of remaining .
  • WaitNext 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.
Submit a number of integer factorizations:
Wait until the fastest one is done:
Wait for the next one:
Finally, wait for all remaining ones:
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]=
Test for primality, returning $Failed if it is not prime:
Adaptively schedule search jobs to keep all kernels busy until a result has been found or the:
ParallelTry is essentially implemented in terms of WaitNext:
Scheduled evaluations no longer needed can be aborted with AbortKernels:
No more than $KernelCount evaluations are initially run to find the fastest one:
Each evaluation should be waited for exactly once:
One of the evaluation objects has already completed:
New in 7