| Action Engine
             | 
A Writer is used to write items to a Channel.
You can get a pointer to a Writer by calling Channel<T>::writer(), which is the object that you should pass to code that needs to write to the channel. Writers must be closed by calling Writer::Close() when the communication is done, to notify any waiting readers that no more items will be written to the channel.
#include <channel.h>
| Public Member Functions | |
| void | Write (const T &item) | 
| Writes the given item to the channel, blocking until it can be written. If the channel is closed, this will throw an exception. | |
| void | Write (T &&item) | 
| Writes the given item to the channel, blocking until it can be written. If the channel is closed, this will throw an exception. | |
| void | Close () | 
| Marks the channel as closed, notifying any waiting readers. See Reader::Read(). May be called at most once. | |
| Case | OnWrite (const T &item) | 
| Returns a Case that can be used to write the given item to the channel. | |
| Case | OnWrite (T &&item) | 
| Returns a Case that can be used to write the given item to the channel. The item is not mutated (moved from) unless the returned Case is selected. | |
| bool | WriteUnlessCancelled (const T &item) | 
| Returns false iff the calling fiber is cancelled before the value can be written. | |
| bool | WriteUnlessCancelled (T &&item) | 
| Returns false iff the calling fiber is cancelled before the value can be written. | |
| Case thread::Writer< T >::OnWrite | ( | const T & | item | ) | 
Returns a Case that can be used to write the given item to the channel.
| item | The item to write to the channel. If the case is selected, ownership of the item is moved to the channel. | 
| Case thread::Writer< T >::OnWrite | ( | T && | item | ) | 
Returns a Case that can be used to write the given item to the channel. The item is not mutated (moved from) unless the returned Case is selected.
item is not mutated (moved from) unless the returned Case is selected. For example:| item | The item to write to the channel. If the case is selected, ownership of the item is moved to the channel. | 
| void thread::Writer< T >::Write | ( | const T & | item | ) | 
Writes the given item to the channel, blocking until it can be written. If the channel is closed, this will throw an exception.
| void thread::Writer< T >::Write | ( | T && | item | ) | 
Writes the given item to the channel, blocking until it can be written. If the channel is closed, this will throw an exception.
| bool thread::Writer< T >::WriteUnlessCancelled | ( | const T & | item | ) | 
Returns false iff the calling fiber is cancelled before the value can be written.
| item | The item to write to the channel. | 
| bool thread::Writer< T >::WriteUnlessCancelled | ( | T && | item | ) | 
Returns false iff the calling fiber is cancelled before the value can be written.
| item | The item to write to the channel. If the function returns true, the ownership of the item is moved to the channel. |