Inheritance diagram for csp::Bucket:
Processes "fall into" a bucket and wait until the bucket is "flushed".
Unlike a barrier, which has a concept of enrollment and waits until all processes are ready to synchronise, any process can fall into a bucket, and they are all released when any process calls flush.
The use of buckets is also covered in the appropriate tutorial section on buckets.
Public Member Functions | |
void | fallInto () |
Waits until the bucket is flushed. | |
usign32 | flush () |
Flushes the bucket, freeing all process that were waiting on it. | |
usign32 | holding () |
Gets the number of processes currently "in" (waiting on) the bucket. |
void csp::Bucket::fallInto | ( | ) | [inline] |
Waits until the bucket is flushed.
Any process may fall into a bucket (i.e. no enrollment is needed). It will then wait until another process calls the flush() function.
usign32 csp::Bucket::flush | ( | ) | [inline] |
Flushes the bucket, freeing all process that were waiting on it.
When flush() is called, all processes that have previously "fallen into" the bucket (since the last flush) are freed. The bucket then becomes empty.
usign32 csp::Bucket::holding | ( | ) | [inline] |
Gets the number of processes currently "in" (waiting on) the bucket.