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()int length()Returns the length of the queue.int lengthUnlocked()Returns the length of the queue.void lock()Acquires the queue's lock. If another thread is already holding the lock, this call will block until the lock becomes available.void * pop()Pops data from the queue. If queue is empty, this function blocks until data becomes available. Returns: data from the queuevoid * popUnlocked()Pops data from the queue. If queue is empty, this function blocks until data becomes available.void push(void * data)Pushes the data into the queue.void pushFront(void * item)Pushes 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)Pushes 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)Inserts data into queue using func to determine the new position.void pushSortedUnlocked(void * data, glib.types.CompareDataFunc func)Inserts data into queue using func to determine the new position.void pushUnlocked(void * data)Pushes the data into the queue.void refUnlocked()Increases the reference count of the asynchronous queue by 1.bool remove(void * item)Remove an item from the queue.bool removeUnlocked(void * item = null)Remove an item from the queue.void sort(glib.types.CompareDataFunc func)Sorts queue using func.void sortUnlocked(glib.types.CompareDataFunc func)Sorts queue using func.void * timedPop(glib.time_val.TimeVal endTime)Pops 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)Pops data from the queue. If the queue is empty, blocks until end_time or until data becomes available.void * timeoutPop(ulong timeout)Pops data from the queue. If the queue is empty, blocks for timeout microseconds, or until data becomes available.void * timeoutPopUnlocked(ulong timeout)Pops data from the queue. If the queue is empty, blocks for timeout microseconds, or until data becomes available.void * tryPop()Tries 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()Tries to pop data from the queue. If no data is available, null is returned.void unlock()Releases the queue's lock.void unrefAndUnlock()Decreases 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