csp::common::BucketFlusher Class Reference

Inheritance diagram for csp::common::BucketFlusher:

csp::CSProcess csp::ThreadCSProcess boost::noncopyable List of all members.

Detailed Description

This process flushes a given bucket every time it is sent "true" on its channel, and quits when it is sent "false".

Whether this process terminates in an orderly fashion (by being sent "false"), or by being poisoned, it will always flush the bucket one last time.

To use this process, you will need to include <cppcsp/common/barrier_bucket.h>


Public Member Functions

 BucketFlusher (Bucket *_bucket, const Chanin< bool > &_in)
 Constructs the process.

Protected Member Functions

void run ()
 You must implement this function to provide the code for your process.


Constructor & Destructor Documentation

csp::common::BucketFlusher::BucketFlusher ( Bucket _bucket,
const Chanin< bool > &  _in 
) [inline]

Constructs the process.

Parameters:
_bucket A pointer to the bucket. This pointer must remain valid for the lifetime of the process
_in The input channel


Member Function Documentation

void csp::common::BucketFlusher::run (  )  [inline, protected, virtual]

You must implement this function to provide the code for your process.

When the run method finishes, the process will terminate.

You should not let an uncaught exception cause the end of this function. If it derives from std::exception, it will be caught (although this behaviour should not be relied upon) but otherwise undefined behaviour will result.

Implements csp::ThreadCSProcess.


Generated on Mon Aug 20 12:24:29 2007 for C++CSP2 by  doxygen 1.4.7