A monotonic clock for scheduling timeouts and delayed messages.
More...
#include <actor_clock.hpp>
Inherited by caf::detail::test_actor_clock, and caf::detail::thread_safe_actor_clock.
|
| enum class | stall_policy {
fail
,
skip
} |
| | Configures how the clock responds to a stalling actor when trying to schedule a periodic action. More...
|
| |
|
using | clock_type = std::chrono::steady_clock |
| | Underlying clock type.
|
| |
|
using | time_point = typename clock_type::time_point |
| | Discrete point in time.
|
| |
|
using | duration_type = typename clock_type::duration |
| | Time interval.
|
| |
|
|
virtual time_point | now () const noexcept |
| | Returns the current wall-clock time.
|
| |
| disposable | schedule (action f) |
| | Schedules an action for execution.
|
| |
| virtual disposable | schedule (time_point t, action f)=0 |
| | Schedules an action for execution at a later time.
|
| |
| disposable | schedule (time_point t, action f, strong_actor_ptr target) |
| | Schedules an action for execution by an actor at a later time.
|
| |
| disposable | schedule (time_point t, action f, weak_actor_ptr target) |
| | Schedules an action for execution by an actor at a later time.
|
| |
|
disposable | schedule_message (time_point t, strong_actor_ptr receiver, mailbox_element_ptr content) |
| | Schedules an arbitrary message to receiver for time point t.
|
| |
|
disposable | schedule_message (time_point t, weak_actor_ptr receiver, mailbox_element_ptr content) |
| | Schedules an arbitrary message to receiver for time point t.
|
| |
|
disposable | schedule_message (time_point t, group target, strong_actor_ptr sender, message content) |
| | Schedules an arbitrary message to target for time point t.
|
| |
A monotonic clock for scheduling timeouts and delayed messages.
◆ stall_policy
Configures how the clock responds to a stalling actor when trying to schedule a periodic action.
| Enumerator |
|---|
| skip | Causes the clock to dispose an action send an error to the actor.
|
◆ schedule() [1/4]
Schedules an action for execution.
- Parameters
-
- Note
- The action runs on the thread of the clock worker and thus must complete within a very short time in order to not delay other work.
◆ schedule() [2/4]
Schedules an action for execution at a later time.
- Parameters
-
| t | The local time at which the action should run. |
| f | The action to schedule. |
- Note
- The action runs on the thread of the clock worker and thus must complete within a very short time in order to not delay other work.
◆ schedule() [3/4]
Schedules an action for execution by an actor at a later time.
- Parameters
-
| t | The local time at which the action should get enqueued to the mailbox of the target. |
| f | The action to schedule. |
| target | The actor that should run the action. |
◆ schedule() [4/4]
Schedules an action for execution by an actor at a later time.
- Parameters
-
| target | The actor that should run the action. |
| f | The action to schedule. |
| t | The local time at which the action should get enqueued to the mailbox of the target. |
The documentation for this class was generated from the following files:
- libcaf_core/caf/actor_clock.hpp
- libcaf_core/caf/actor_clock.cpp