Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
A timer messaging block is a single-target source_block capable of sending a message to its target after a specified time period has elapsed or at specific intervals.
template<
class _Type
>
class timer : public Concurrency::details::_Timer, public source_block<single_link_registry<ITarget<_Type>>>;
Parameters
- _Type
The payload type of the output messages of this block.
Members
Public Constructors
Name |
Description |
|---|---|
Overloaded. Constructs a timer messaging block that will fire a given message after a specified interval. |
|
Destroys a timer messaging block. |
Public Methods
Name |
Description |
|---|---|
Stops the timer messaging block. If it is a repeating timer messaging block, it can be restarted with a subsequent start() call. For non-repeating timers, this has the same effect as a stop call. |
|
Starts the timer messaging block. The specified number of milliseconds after this is called, the specified value will be propagated downstream as a message. |
|
Stops the timer messaging block. |
Protected Methods
Name |
Description |
|---|---|
Accepts a message that was offered by this timer messaging block, transferring ownership to the caller. |
|
Consumes a message previously offered by the timer and reserved by the target, transferring ownership to the caller. |
|
A callback that notifies that a new target has been linked to this timer messaging block. |
|
Tries to offer the message produced by the timer block to all of the linked targets. |
|
Releases a previous message reservation. (Overrides source_block::release_message.) |
|
Reserves a message previously offered by this timer messaging block. (Overrides source_block::reserve_message.) |
|
Resumes propagation after a reservation has been released. (Overrides source_block::resume_propagation.) |
Remarks
For more information, see Asynchronous Message Blocks.
Inheritance Hierarchy
timer
Requirements
Header: agents.h
Namespace: concurrency