Go up to Constructors
Go forward to open(): Open a Bag (Binding Form)

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)

Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: main.tex,v 1.10 1996/04/04 11:45:47 schreine Exp

Up Next