C++ Actor Framework 0.19
|
The base class for all mailbox implementations. More...
#include <abstract_mailbox.hpp>
Public Member Functions | |
virtual intrusive::inbox_result | push_back (mailbox_element_ptr ptr)=0 |
Adds a new element to the mailbox. | |
virtual void | push_front (mailbox_element_ptr ptr)=0 |
Adds a new element to the mailbox by putting it in front of the queue. | |
virtual mailbox_element_ptr | pop_front ()=0 |
Removes the next element from the mailbox. | |
virtual bool | closed () const noexcept=0 |
Checks whether the mailbox has been closed. | |
virtual bool | blocked () const noexcept=0 |
Checks whether the owner of this mailbox is currently waiting for new messages. | |
virtual bool | try_block ()=0 |
Tries to put the mailbox in a blocked state. | |
virtual bool | try_unblock ()=0 |
Tries to put the mailbox in an empty state from a blocked state. | |
virtual size_t | close (const error &reason)=0 |
Closes the mailbox and discards all pending messages. | |
virtual size_t | size ()=0 |
Returns the number of pending messages. | |
virtual void | ref_mailbox () noexcept=0 |
Increases the reference count by one. | |
virtual void | deref_mailbox () noexcept=0 |
Decreases the reference count by one and deletes this instance if the reference count drops to zero. | |
bool | empty () |
Checks whether the mailbox is empty. | |
The base class for all mailbox implementations.
|
pure virtualnoexcept |
Checks whether the owner of this mailbox is currently waiting for new messages.
Implemented in caf::detail::default_mailbox.
|
pure virtual |
Closes the mailbox and discards all pending messages.
Implemented in caf::detail::default_mailbox.
|
pure virtualnoexcept |
Checks whether the mailbox has been closed.
Implemented in caf::detail::default_mailbox.
|
pure virtualnoexcept |
Decreases the reference count by one and deletes this instance if the reference count drops to zero.
Implemented in caf::detail::default_mailbox.
|
pure virtual |
Removes the next element from the mailbox.
nullptr
if the mailbox is empty. Implemented in caf::detail::default_mailbox.
|
pure virtual |
Adds a new element to the mailbox.
inbox_result::success
if the element has been added to the mailbox, inbox_result::unblocked_reader
if the reader has been unblocked, or inbox_result::queue_closed
if the mailbox has been closed. @threadsafe Implemented in caf::detail::default_mailbox.
|
pure virtual |
Adds a new element to the mailbox by putting it in front of the queue.
Implemented in caf::detail::default_mailbox.
|
pure virtualnoexcept |
Increases the reference count by one.
Implemented in caf::detail::default_mailbox.
|
pure virtual |
Returns the number of pending messages.
Implemented in caf::detail::default_mailbox.
|
pure virtual |
Tries to put the mailbox in a blocked state.
Implemented in caf::detail::default_mailbox.
|
pure virtual |
Tries to put the mailbox in an empty state from a blocked state.
Implemented in caf::detail::default_mailbox.