unbounded_buffer Class
An unbounded_buffer messaging block is a multi-target, multi-source, ordered propagator_block capable of storing an unbounded number of messages.
template<
class _Type
>
class unbounded_buffer : public propagator_block<multi_link_registry<ITarget<_Type>>, multi_link_registry<ISource<_Type>>>;
Parameters
- _Type
The payload type of the messages stored and propagated by the buffer.
Members
Public Constructors
Name |
Description |
---|---|
Overloaded. Constructs an unbounded_buffer messaging block. |
|
Destroys the unbounded_buffer messaging block. |
Public Methods
Name |
Description |
---|---|
Removes an item from the unbounded_buffer messaging block. |
|
Adds an item to the unbounded_buffer messaging block. |
Protected Methods
Name |
Description |
---|---|
Accepts a message that was offered by this unbounded_buffer messaging block, transferring ownership to the caller. |
|
Consumes a message previously offered by the unbounded_buffer messaging block and reserved by the target, transferring ownership to the caller. |
|
A callback that notifies that a new target has been linked to this unbounded_buffer messaging block. |
|
Places the message_PMessage in this unbounded_buffer messaging block and tries to offer it to all of the linked targets. |
|
Asynchronously passes a message from an ISource block to this unbounded_buffer messaging block. It is invoked by the propagate method, when called by a source block. |
|
Places the message_PMessage in this unbounded_buffer messaging block and tries to offer it to all of the linked targets. (Overrides source_block::propagate_output_messages.) |
|
Releases a previous message reservation. (Overrides source_block::release_message.) |
|
Reserves a message previously offered by this unbounded_buffer messaging block. (Overrides source_block::reserve_message.) |
|
Resumes propagation after a reservation has been released. (Overrides source_block::resume_propagation.) |
|
Synchronously passes a message from an ISource block to this unbounded_buffer messaging block. It is invoked by the send method, when called by a source block. |
|
Overrides the supports_anonymous_source method to indicate that this block can accept messages offered to it by a source that is not linked. (Overrides ITarget::supports_anonymous_source.) |
Remarks
For more information, see Asynchronous Message Blocks.
Inheritance Hierarchy
unbounded_buffer
Requirements
Header: agents.h
Namespace: concurrency