\"\" \"\" \"\"
Go up to Constructors
Go forward to open(): Open a Bag (Binding Form)
RISC-Linz logo

Open(): Open a Bag

b = ThreadBag<T>::Open()
b = ThreadBag<T>::Open(n)
      ThreadBag<T> b
      int n

Specification: Returns a new and empty bag b.

  1. In the first form, b is open and may collect an arbitrary number of threads.
  2. In the second form, b is closed and at most n more threads may be added to the bag.
Constraint: It is illegal to apply Open to n<0.

Note: The second form is equivalent to 

ThreadBag<T> b
b = ThreadBag<T>::Open()
b->close(n)

Author: Wolfgang Schreiner
Last Modification: April 12, 1997