Rizin
unix-like reverse engineering framework and cli tools
rz_th_queue_t Struct Reference

RzThreadQueue is a thread-safe queue that can be listened on from multiple threads. More...

Public Attributes

RzThreadLocklock
 
RzThreadCondcond
 
size_t max_size
 
RzListlist
 

Detailed Description

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.

Member Data Documentation

◆ cond

RzThreadCond* rz_th_queue_t::cond

Definition at line 19 of file thread_queue.c.

◆ list

RzList* rz_th_queue_t::list

Definition at line 21 of file thread_queue.c.

◆ lock

RzThreadLock* rz_th_queue_t::lock

Definition at line 18 of file thread_queue.c.

◆ max_size

size_t rz_th_queue_t::max_size

Definition at line 20 of file thread_queue.c.


The documentation for this struct was generated from the following file: