The performance of a parallel
program may be improved by processing the results of a set of tasks not in a
predetermined order but in the order in which they happen to arrive. Therefore
we need a non-deterministic form of task synchronization; this is especially
useful in speculative algorithms where the results of some tasks may turn out
to be not of interest any more:
dist[select](tlist)
blocks the execution of the current
task until any task t in the list of task handles tlist has
terminated and returns a list r such that r[1] is the result of
t and r[2] is the index of t in tlist.
dist[delete](t)
announces that the result of task
t is not required any more. If this task has not yet started execution,
it will be deleted from the system (however, if it has already started, it
will continue execution until termination).