|
Symbian platform (C++)
SDK native APIs, runtime and tooling
|
A Channel is a bounded FIFO queue that allows multiple readers and writers to communicate with each other. More...
#include <cpp/symbian/concurrency/common/thread/channel.h>
Public Member Functions | |
| Channel (size_t capacity) | |
| Constructs a Channel with the given capacity. | |
| Channel (const Channel &)=delete | |
| Channel & | operator= (const Channel &)=delete |
| ~Channel () | |
| Reader< T > *absl_nonnull | reader () |
| Returns a Reader that can be used to read items from the channel. | |
| Writer< T > *absl_nonnull | writer () |
| Returns a Writer that can be used to write items to the channel. | |
| size_t | length () const |
| Returns the instantaneous length of the channel. | |
| Channel (std::size_t capacity) | |
| Channel (const Channel &)=delete | |
| Channel & | operator= (const Channel &)=delete |
| ~Channel () | |
| Reader< T > * | reader () |
| Writer< T > * | writer () |
| std::size_t | length () const |
Friends | |
| struct | internal::ReadSelectable< T > |
| struct | internal::WriteSelectable< T > |
| class | Reader< T > |
| class | Writer< T > |
A Channel is a bounded FIFO queue that allows multiple readers and writers to communicate with each other.
The channel has a fixed capacity, and will block writers if the channel is full, and readers if the channel is empty. If the channel is closed, all waiting readers will be notified that no more items will be written to the channel.
|
inlineexplicit |
Constructs a Channel with the given capacity.
| capacity | The maximum number of items that can be buffered in the channel. If the channel is full, writers will block until space is available. |
|
delete |
|
inline |
|
inlineexplicit |
|
delete |
|
inline |
|
inline |
Returns the instantaneous length of the channel.
This method should never be used to determine whether the channel is full or empty, as it may return a value that is not consistent with the state of the channel at the time of the call.
|
inline |
|
delete |
|
delete |
|
inline |
|
inline |
|
inline |
Returns a Writer that can be used to write items to the channel.
Multiple producers can write to the channel concurrently, and every item written to the channel, if read at all, will be read by exactly one reader. If the channel is at capacity, writers will block until space is available in the channel.
|
inline |
|
friend |
|
friend |
|
friend |
|
friend |