Inheritance diagram for csp::common::WriterProcess< DATA_TYPE >:
When the process has completed the specified number of writes, it simply finishes. It does not poison the channel. If you want to poison the channel afterwards, consider using something like this:
Run( InSequenceOneThread(new WriterProcess<int>(out,21,7)) (new ChannelPoisoner(out)) );
To use this process, you will need to include <cppcsp/common/basic.h>
Public Member Functions | |
WriterProcess (const Chanout< DATA_TYPE > &_out, const DATA_TYPE &value, int _times=1) | |
Constructs the process. | |
Protected Member Functions | |
void | run () |
You must implement this function to provide the code for your process. |
csp::common::WriterProcess< DATA_TYPE >::WriterProcess | ( | const Chanout< DATA_TYPE > & | _out, | |
const DATA_TYPE & | value, | |||
int | _times = 1 | |||
) | [inline] |
Constructs the process.
_out | The channel to write to | |
value | The value to write to the channel | |
_times | The number of times to write the value to the channel. Defaults to one. |
void csp::common::WriterProcess< DATA_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.