Sometimes when constructing a process network, you will find that a process is writing to a channel where you have no need of that data. In this case you effectively want to discard the data. One way of doing this is to have a receiver process on the reading end of the channel that does nothing with the data. However, this is wasteful - so this black-hole channel is provided for that use. It is particularly useful for testing processes.
All data written to a black-hole channel - as its name suggests - is lost. It should only be used by one writer. The channel does support poison - although only the writer can poison it or detect the poison, so it is fairly useless.
Public Member Functions | |
Chanout< DATA_TYPE > | writer () |
Gets a writing end of the channel. |
Chanout<DATA_TYPE> csp::BlackHoleChannel< DATA_TYPE >::writer | ( | ) | [inline] |
Gets a writing end of the channel.