Go backward to Wait() : Returning the Bag ResultsGo up to Selectors |
Size()
: Size of a Thread Bag=
Size
(b) Specification: Returns the number of threads in the bag after
the bag has been closed. This includes also all threads whose number has been
declared in the close
statement but
that have actually not yet entered the bag.
Constraints: It is illegal to apply this operation if b is unbound.
Complexity: .
Implementation: If the bag is not yet closed, the current thread is blocked until another thread closes the bag. If the bag will never be closed, the current thread will be permanently blocked.