Rizin
unix-like reverse engineering framework and cli tools
|
RzThreadQueue is a thread-safe queue that can be listened on from multiple threads. More...
Public Attributes | |
RzThreadLock * | lock |
RzThreadCond * | cond |
size_t | max_size |
RzList * | list |
RzThreadQueue is a thread-safe queue that can be listened on from multiple threads.
This Queue is thread-safe and allows to perform LIFO/FIFO operations. rz_th_queue_new Allocates a RzThreadQueue structure and allows to limit the size of the queue. rz_th_queue_push Pushes an element to the queue unless the limit is reached. rz_th_queue_pop Pops an element from the queue, but returns NULL when is empty. rz_th_queue_wait_pop Pops an element from the queue, but awaits for new elements when is empty. rz_th_queue_free Frees a RzThreadQueue structure, if the queue is not empty, it frees the elements with the provided qfree function.
Definition at line 17 of file thread_queue.c.
RzThreadCond* rz_th_queue_t::cond |
Definition at line 19 of file thread_queue.c.
RzList* rz_th_queue_t::list |
Definition at line 21 of file thread_queue.c.
RzThreadLock* rz_th_queue_t::lock |
Definition at line 18 of file thread_queue.c.
size_t rz_th_queue_t::max_size |
Definition at line 20 of file thread_queue.c.