\"\" \"\" \"\"
Go up to Thread Bags
Go forward to Definition
RISC-Linz logo

Representation

 

A thread bag of type ThreadBag<T> is represented as follows:

Initially a bag is in the open state. In this state, it is not known how many threads the bag will eventually hold; arbitrarily many threads can be added to the bag. When the bag is eventually closed, only a declared number of more threads can be added to the bag. During the open state, results delivered to the bag are collected in the result list. When the bag is closed (i.e. the final bag size is known) an array is allocated to receive all thread results, those that have been already collected in the result list, and those that still remain to be computed.
Author: Wolfgang Schreiner
Last Modification: April 12, 1997