Inheritance diagram for csp::CSProcess:
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.
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. |
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.
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 >.