csp::CSProcess Class Reference
[Processes]

Inheritance diagram for csp::CSProcess:

csp::ThreadCSProcess boost::noncopyable csp::common::BarrierSyncer csp::common::BucketFlusher csp::common::ChannelPoisoner< CHANNEL_END_TYPE > csp::common::EvaluateFunction< RESULT, FUNCTION > csp::common::ExtId< DATA_TYPE > csp::common::ExtMerger< DATA_TYPE > csp::common::ExtSyncId< DATA_TYPE > csp::common::FunctionProcess< DATA_TYPE_IN, DATA_TYPE_OUT, FUNCTION > csp::common::Id< DATA_TYPE > csp::common::Merger< DATA_TYPE > csp::common::NotifySender< DATA_TYPE > csp::common::Prefix< DATA_TYPE > csp::common::ReaderProcess< DATA_TYPE > csp::common::ReadOnceProcess< DATA_TYPE > csp::common::SeqDelta< DATA_TYPE > csp::common::SkipProcess csp::common::SleepForProcess csp::common::SleepUntilProcess csp::common::Successor< DATA_TYPE > csp::common::WriteOnceProcess< DATA_TYPE > csp::common::WriterProcess< DATA_TYPE > List of all members.

Detailed Description

The base class for processes, that allows processes to be run in a new thead or the same thread.

You should sub-class this class in order to implement the run() method. In most cases you should sub-class this class rather than ThreadCSProcess - see the notes in the documentation for ThreadCSProcess for when you should use that class.

This inheritance structure may seem strange at first (CSProcess inheriting from ThreadCSProcess). The practical result is that ThreadCSProcess, or any child/grandchild(via CSProcess) of it, can be run in a new thread, whereas only CSProcess and its sub-classes can be added to the current thread. For more information, see the page on Running Processes.

More information on processes is available on the Processes page and the Processes section of the guide.

See also:
ThreadCSProcess

Running Processes

Processes

Processes section of the guide


Protected Member Functions

 CSProcess (unsigned _stackSize=1048576)
 Allows the stack size to be specified.
virtual void run ()=0
 You must implement this function to provide the code for your process.


Constructor & Destructor Documentation

csp::CSProcess::CSProcess ( unsigned  _stackSize = 1048576  )  [inline, explicit, protected]

Allows the stack size to be specified.

For information on stack sizes, please read the stacks section of the Processes page.


Member Function Documentation

virtual void csp::ThreadCSProcess::run (  )  [protected, pure virtual, inherited]

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.

Implemented in csp::common::BarrierSyncer, csp::common::BucketFlusher, csp::common::SkipProcess, csp::common::Id< DATA_TYPE >, csp::common::ExtId< DATA_TYPE >, csp::common::ExtSyncId< DATA_TYPE >, csp::common::WriterProcess< DATA_TYPE >, csp::common::ReaderProcess< DATA_TYPE >, csp::common::WriteOnceProcess< DATA_TYPE >, csp::common::ReadOnceProcess< DATA_TYPE >, csp::common::Prefix< DATA_TYPE >, csp::common::Successor< DATA_TYPE >, csp::common::SeqDelta< DATA_TYPE >, csp::common::SleepForProcess, csp::common::SleepUntilProcess, csp::common::NotifySender< DATA_TYPE >, csp::common::Merger< DATA_TYPE >, csp::common::ExtMerger< DATA_TYPE >, csp::common::EvaluateFunction< RESULT, FUNCTION >, csp::common::FunctionProcess< DATA_TYPE_IN, DATA_TYPE_OUT, FUNCTION >, and csp::common::ChannelPoisoner< CHANNEL_END_TYPE >.


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