glib.async_queue
Module for [AsyncQueue] class
class AsyncQueue
Types 1
classAsyncQueue
An opaque data structure which represents an asynchronous queue.
It should only be accessed through the g_async_queue_* functions.
Methods
void * _cPtr() nothrowvoid lock() nothrowAcquires the queue's lock. If another thread is already holding the lock, this call will block until the lock becomes available.void * pop() nothrowPops data from the queue. If queue is empty, this function blocks until data becomes available. Returns: data from the queuevoid * popUnlocked() nothrowPops data from the queue. If queue is empty, this function blocks until data becomes available.void pushFront(void * item) nothrowPushes the item into the queue. item must not be null. In contrast to [glib.async_queue.AsyncQueue.push], this function pushes the new item ahead of the items already in the queue, so that it will ...void pushFrontUnlocked(void * item) nothrowPushes the item into the queue. item must not be null. In contrast to [glib.async_queue.AsyncQueue.pushUnlocked], this function pushes the new item ahead of the items already in the queue, so that ...void pushSorted(void * data, glib.types.CompareDataFunc func) nothrowInserts data into queue using func to determine the new position.void pushSortedUnlocked(void * data, glib.types.CompareDataFunc func) nothrowInserts data into queue using func to determine the new position.void * timedPop(glib.time_val.TimeVal endTime) nothrowPops data from the queue. If the queue is empty, blocks until end_time or until data becomes available.void * timedPopUnlocked(glib.time_val.TimeVal endTime) nothrowPops data from the queue. If the queue is empty, blocks until end_time or until data becomes available.void * timeoutPop(ulong timeout) nothrowPops data from the queue. If the queue is empty, blocks for timeout microseconds, or until data becomes available.void * timeoutPopUnlocked(ulong timeout) nothrowPops data from the queue. If the queue is empty, blocks for timeout microseconds, or until data becomes available.void * tryPop() nothrowTries to pop data from the queue. If no data is available, null is returned. Returns: data from the queue or null, when no data is available immediately.void * tryPopUnlocked() nothrowTries to pop data from the queue. If no data is available, null is returned.void unrefAndUnlock() nothrowDecreases the reference count of the asynchronous queue by 1 and releases the lock. This function must be called while holding the queue's lock. If the reference count went to 0, the queue will be ...Destructors