MySQL 9.1.0
Source Code Documentation
|
Abortable synchronized queue extends synchronized queue allowing to abort methods waiting for elements on queue. More...
#include <plugin_utils.h>
Public Member Functions | |
Abortable_synchronized_queue (PSI_memory_key key) | |
~Abortable_synchronized_queue () override=default | |
bool | push (const T &value) override |
Inserts an element in the queue. More... | |
bool | pop (T *out) override |
Fetches the front of the queue and removes it. More... | |
bool | pop () override |
Pops the front of the queue removing it. More... | |
bool | front (T *out) override |
Fetches the front of the queue but does not remove it. More... | |
void | abort (bool delete_elements) |
Remove all elements, abort current and future waits on retrieving elements from queue. More... | |
Public Member Functions inherited from Synchronized_queue< T > | |
Synchronized_queue (PSI_memory_key key) | |
~Synchronized_queue () override | |
bool | empty () override |
Checks if the queue is empty. More... | |
size_t | size () override |
Checks the queue size. More... | |
Public Member Functions inherited from Synchronized_queue_interface< T > | |
virtual | ~Synchronized_queue_interface ()=default |
Private Attributes | |
bool | m_abort |
Additional Inherited Members | |
Protected Attributes inherited from Synchronized_queue< T > | |
mysql_mutex_t | lock |
mysql_cond_t | cond |
std::queue< T, std::list< T, Malloc_allocator< T > > > | queue |
Abortable synchronized queue extends synchronized queue allowing to abort methods waiting for elements on queue.
|
inline |
|
overridedefault |
|
inline |
Remove all elements, abort current and future waits on retrieving elements from queue.
delete_elements | When true, apart from emptying the queue, it also delete each element. When false, the delete (memory release) responsibility belongs to the push() caller. |
|
inlineoverridevirtual |
Fetches the front of the queue but does not remove it.
out | The fetched reference. |
Reimplemented from Synchronized_queue< T >.
|
inlineoverridevirtual |
Pops the front of the queue removing it.
Reimplemented from Synchronized_queue< T >.
|
inlineoverridevirtual |
Fetches the front of the queue and removes it.
out | The fetched reference. |
Reimplemented from Synchronized_queue< T >.
|
inlineoverridevirtual |
Inserts an element in the queue.
Alerts any other thread lock on pop() or front()
value | The value to insert |
Reimplemented from Synchronized_queue< T >.
|
private |