AsyncQueue

class AsyncQueue(pointer: <Error class: unknown class><<Error class: unknown class>>) : ProxyInstance

An opaque data structure which represents an asynchronous queue.

It should only be accessed through the g_async_queue_* functions.

Skipped during bindings generation

  • method ref: Return type AsyncQueue is unsupported

  • function new: Return type AsyncQueue is unsupported

  • parameter item_free_func: DestroyNotify

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Properties

Link copied to clipboard
val glibAsyncQueuePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val handle: <Error class: unknown class>?

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Compare two proxy instances for equality. This will compare both the type of the instances, and their memory addresses.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun length(): <Error class: unknown class>

Returns the length of the queue.

Link copied to clipboard
fun lengthUnlocked(): <Error class: unknown class>

Returns the length of the queue.

Link copied to clipboard
fun lock()

Acquires the @queue's lock. If another thread is already holding the lock, this call will block until the lock becomes available.

Link copied to clipboard
fun pop(): <Error class: unknown class>?

Pops data from the @queue. If @queue is empty, this function blocks until data becomes available.

Link copied to clipboard
fun popUnlocked(): <Error class: unknown class>?

Pops data from the @queue. If @queue is empty, this function blocks until data becomes available.

Link copied to clipboard
fun push(data: <Error class: unknown class>)

Pushes the @data into the @queue.

Link copied to clipboard
fun pushFront(item: <Error class: unknown class>)

Pushes the @item into the @queue. @item must not be null. In contrast to g_async_queue_push(), this function pushes the new item ahead of the items already in the queue, so that it will be the next one to be popped off the queue.

Link copied to clipboard
fun pushFrontUnlocked(item: <Error class: unknown class>)

Pushes the @item into the @queue. @item must not be null. In contrast to g_async_queue_push_unlocked(), this function pushes the new item ahead of the items already in the queue, so that it will be the next one to be popped off the queue.

Link copied to clipboard
fun pushSorted(data: <Error class: unknown class>, func: CompareDataFunc)

Inserts @data into @queue using @func to determine the new position.

Link copied to clipboard
fun pushSortedUnlocked(data: <Error class: unknown class>? = null, func: CompareDataFunc)

Inserts @data into @queue using @func to determine the new position.

Link copied to clipboard
fun pushUnlocked(data: <Error class: unknown class>)

Pushes the @data into the @queue.

Link copied to clipboard

Increases the reference count of the asynchronous @queue by 1.

Link copied to clipboard
fun remove(item: <Error class: unknown class>): Boolean

Remove an item from the queue.

Link copied to clipboard
fun removeUnlocked(item: <Error class: unknown class>? = null): Boolean

Remove an item from the queue.

Link copied to clipboard

Sorts @queue using @func.

Link copied to clipboard

Sorts @queue using @func.

Link copied to clipboard
fun timedPop(endTime: TimeVal): <Error class: unknown class>?

Pops data from the @queue. If the queue is empty, blocks until

Link copied to clipboard
fun timedPopUnlocked(endTime: TimeVal): <Error class: unknown class>?

Pops data from the @queue. If the queue is empty, blocks until

Link copied to clipboard
fun timeoutPop(timeout: <Error class: unknown class>): <Error class: unknown class>?

Pops data from the @queue. If the queue is empty, blocks for

Link copied to clipboard
fun timeoutPopUnlocked(timeout: <Error class: unknown class>): <Error class: unknown class>?

Pops data from the @queue. If the queue is empty, blocks for

Link copied to clipboard
fun tryPop(): <Error class: unknown class>?

Tries to pop data from the @queue. If no data is available, null is returned.

Link copied to clipboard
fun tryPopUnlocked(): <Error class: unknown class>?

Tries to pop data from the @queue. If no data is available, null is returned.

Link copied to clipboard
fun unlock()

Releases the queue's lock.

Link copied to clipboard
fun unref()

Decreases the reference count of the asynchronous @queue by 1.

Link copied to clipboard

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 destroyed and the memory allocated will be freed.