glib.async_queue

Module for [AsyncQueue] class

Types 1

An opaque data structure which represents an asynchronous queue.

It should only be accessed through the g_async_queue_* functions.

Fields
GAsyncQueue * _cInstancePtr
bool owned
Methods
void * _cPtr() nothrow
int length() nothrowReturns the length of the queue.
int lengthUnlocked() nothrowReturns the length of the queue.
void 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 queue
void * popUnlocked() nothrowPops data from the queue. If queue is empty, this function blocks until data becomes available.
void push(void * data) nothrowPushes the data into the queue.
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 pushUnlocked(void * data) nothrowPushes the data into the queue.
void refUnlocked() nothrowIncreases the reference count of the asynchronous queue by 1.
bool remove(void * item) nothrowRemove an item from the queue.
bool removeUnlocked(void * item = null) nothrowRemove an item from the queue.
void sort(glib.types.CompareDataFunc func) nothrowSorts queue using func.
void sortUnlocked(glib.types.CompareDataFunc func) nothrowSorts queue using func.
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 unlock() nothrowReleases the queue's lock.
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 ...
Constructors
this(void * ptr, Flag!"Take" take)
Destructors