Go backward to Open(): Open a Bag
Go up to Constructors
Go forward to ThreadBagn: Adding a Thread

open(): Open a Bag (Binding Form)

b.open()
b.open(n)
      ThreadBag<T> b
      int n

Specification: Binds b to a new and empty bag. This overrides any previous binding of 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 operation is equivalent to 

b.open()
b->close(n)
Both operations are more efficient than the otherwise equivalent forms 
b = ThreadBag<T>::Open()
b = ThreadBag<T>::Open(n)

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

Prev Up Next