-
Notifications
You must be signed in to change notification settings - Fork 56
MTY_QueueCreate
chrisd1100 edited this page Aug 25, 2022
·
1 revision
Create an MTY_Queue
for thread safe serialization.
The queue is a multi-producer single-consumer style queue, meaning multiple threads can submit to the queue safely, but only a single thread can pop from it.
MTY_Queue *MTY_QueueCreate(
uint32_t len,
size_t bufSize
);
len
(uint32_t
)
The number of buffers in the queue.
bufSize
(size_t
)
The preallocated size of each buffer in the queue. If only pushing via MTY_QueuePushPtr
, this can be set to 0.
MTY_Queue *
The returned MTY_Queue
must be destroyed with MTY_QueueDestroy
.