C++ Actor Framework 1.0.0
|
Enforces strict order of message delivery, i.e., deliver messages in the same order as if they were deserialized by a single thread. More...
#include <message_queue.hpp>
Classes | |
struct | actor_msg |
Request for sending a message to an actor at a later time. More... | |
Public Member Functions | |
void | push (scheduler *ctx, uint64_t id, strong_actor_ptr receiver, mailbox_element_ptr content) |
Adds a new message to the queue or deliver it immediately if possible. | |
void | drop (scheduler *ctx, uint64_t id) |
Marks given ID as dropped, effectively skipping it without effect. | |
uint64_t | new_id () |
Returns the next ascending ID. | |
Public Attributes | |
std::mutex | lock |
Protects all other properties. | |
uint64_t | next_id |
The next available ascending ID. | |
uint64_t | next_undelivered |
The next ID that we can ship. | |
std::vector< actor_msg > | pending |
Keeps messages in sorted order in case a message other than next_undelivered gets ready first. | |
Enforces strict order of message delivery, i.e., deliver messages in the same order as if they were deserialized by a single thread.
uint64_t caf::io::basp::message_queue::next_id |
The next available ascending ID.
The counter is large enough to overflow after roughly 600 years if we dispatch a message every microsecond.