Go up to Selectors Go forward to Size() : Size of a Thread Bag
|
Wait()
: Returning the Bag Results=
Wait
(b, i) =
Wait
(b, i, &
d) Specification: Returns the result r with index i from bag b. In the second form, d is set to 1 if an object with such an index exists and 0 else. The first result has index .
The index ordering of thread results is unspecified apart from the following constraint ( is the number of threads in b):
If Wait
(b, i) blocks forever (because the corresponding
thread never terminates), then also each thread with will
never terminate provided that
has been started with start
.
Constraints: It is illegal to apply Wait
to an unbound handle
b. It is illegal to apply Wait
to some less than zero. In
the first form, it is illegal to apply Wait
to some larger than
Size
(b)-1.
Complexity: