Go backward to Representation
Go up to Thread Bags
Go forward to Constructors

Definition

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

Specification: Defines a thread bag handle b.

  1. In the first form, b is not yet bound to any bag.
  2. In the second form, b is bound to a new and empty bag which can hold n threads. The bag is closed.
Constraint: It is illegal to define a thread bag with n<0.

Note: The second form is equivalent to 

ThreadBag<T> b
b.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