Inheritance diagram for csp::common::ChannelPoisoner< CHANNEL_END_TYPE >:
It is typically used in sequence with another process using the same channel, so that once the previous process has finished, a channel it uses will be poisoned. For example:
//Assuming out is some Chanout<int> we have: Run(InSequenceOneThread (new WriterProcess<int>(out,1,7) ) //Send the value "1" 7 times (new ChannelPoisoner< Chanout<int> >(out) ) //Then poison the channel );
To use this process, you will need to include <cppcsp/common/basic.h>
Public Member Functions | |
ChannelPoisoner (const CHANNEL_END_TYPE &_end) | |
Constructs the process. | |
Protected Member Functions | |
void | run () |
You must implement this function to provide the code for your process. |
csp::common::ChannelPoisoner< CHANNEL_END_TYPE >::ChannelPoisoner | ( | const CHANNEL_END_TYPE & | _end | ) | [inline] |
Constructs the process.
_end | The channel end to poison |
void csp::common::ChannelPoisoner< CHANNEL_END_TYPE >::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.