csp::BlackHoleChannel< DATA_TYPE > Class Template Reference
[Channels]

List of all members.

Detailed Description

template<typename DATA_TYPE>
class csp::BlackHoleChannel< DATA_TYPE >

A "one-to-none" channel.

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.

DATA_TYPE Requirements

DATA_TYPE* must be a valid type; DATA_TYPE cannot be a reference. No further restrictions are placed on DATA_TYPE.


Public Member Functions

Chanout< DATA_TYPE > writer ()
 Gets a writing end of the channel.


Member Function Documentation

template<typename DATA_TYPE>
Chanout<DATA_TYPE> csp::BlackHoleChannel< DATA_TYPE >::writer (  )  [inline]

Gets a writing end of the channel.


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