|
C++ Actor Framework 1.0.0
|
An intrusive, thread-safe LIFO queue implementation for a single reader with any number of writers. More...
#include <lifo_inbox.hpp>
Public Member Functions | |
| inbox_result | push_front (pointer new_element) noexcept |
| Tries to enqueue a new element to the inbox. | |
| inbox_result | push_front (unique_pointer x) noexcept |
| Tries to enqueue a new element to the inbox. | |
| template<class... Ts> | |
| inbox_result | emplace_front (Ts &&... xs) |
| Tries to enqueue a new element to the mailbox. | |
| bool | empty () const noexcept |
| Queries whether this queue is empty. | |
| bool | closed () const noexcept |
| Queries whether this has been closed. | |
| bool | blocked () const noexcept |
| Queries whether this has been marked as blocked, i.e., the owner of the list is waiting for new data. | |
| bool | try_block () noexcept |
Tries to set this queue from empty to blocked. | |
| bool | try_unblock () noexcept |
Tries to set this queue from blocked to empty. | |
| pointer | take_head (pointer new_head) noexcept |
Sets the head to new_head and returns the previous head if the queue was not empty. | |
| pointer | take_head () noexcept |
Sets the head to stack_empty_tag() and returns the previous head if the queue was not empty. | |
| void | close () |
| Closes this queue and deletes all remaining elements. | |
| template<class F > | |
| void | close (F &&f) |
Closes this queue and applies f to each pointer. | |
Static Public Member Functions | |
| static pointer | promote (node_pointer ptr) noexcept |
| Casts a node type to its value type. | |
An intrusive, thread-safe LIFO queue implementation for a single reader with any number of writers.
| void caf::intrusive::lifo_inbox< T >::close | ( | ) |
Closes this queue and deletes all remaining elements.
Closes this queue and applies f to each pointer.
The function object f must take ownership of the passed pointer.
| inbox_result caf::intrusive::lifo_inbox< T >::emplace_front | ( | Ts &&... | xs | ) |
Tries to enqueue a new element to the mailbox.
@threadsafe
|
noexcept |
Queries whether this queue is empty.
!closed() && !blocked()
|
noexcept |
Tries to enqueue a new element to the inbox.
@threadsafe
|
noexcept |
Tries to enqueue a new element to the inbox.
@threadsafe