MySQL 8.0.39
Source Code Documentation
|
Node that holds an element (payload) of the MPSC queue. More...
Public Member Functions | |
Gcs_mpsc_queue_node () | |
Creates an unlinked and empty node. More... | |
Gcs_mpsc_queue_node (T *initial_payload) | |
Creates an unlinked node with the given payload. More... | |
Gcs_mpsc_queue_node (Gcs_mpsc_queue_node const &)=delete | |
Gcs_mpsc_queue_node (Gcs_mpsc_queue_node &&)=delete | |
Gcs_mpsc_queue_node & | operator= (Gcs_mpsc_queue_node const &)=delete |
Gcs_mpsc_queue_node & | operator= (Gcs_mpsc_queue_node &&)=delete |
Gcs_mpsc_queue_node * | get_next (std::memory_order memory_order) |
Gets the next node in the linked list. More... | |
void | set_next (Gcs_mpsc_queue_node *node, std::memory_order memory_order) |
Links a node to this node. More... | |
T * | extract_payload () |
Extracts the payload from this node. More... | |
Private Attributes | |
std::atomic< Gcs_mpsc_queue_node * > | m_next |
The next node in the linked list. More... | |
T * | m_payload |
The payload. More... | |
Node that holds an element (payload) of the MPSC queue.
|
inline |
Creates an unlinked and empty node.
|
inline |
Creates an unlinked node with the given payload.
The node takes ownership of initial_payload
.
initial_payload | the payload |
|
delete |
|
delete |
|
inline |
Extracts the payload from this node.
Transfers ownership of the payload to the caller, i.e. after calling this method this node has no payload.
T* | if there is a payload |
nullptr | otherwise |
|
inline |
Gets the next node in the linked list.
memory_order | the desired memory ordering semantics for the load |
Gcs_mpsc_queue_node* | if there is a linked node |
nullptr | otherwise |
|
delete |
|
delete |
|
inline |
Links a node to this node.
node | the node to link |
memory_order | the desired memory ordering semantics for the store |
|
private |
The next node in the linked list.
|
private |
The payload.