AsyncQueue

class AsyncQueue(val glibAsyncQueuePointer: <Error class: unknown class><<Error class: unknown class>>) : ProxyInstance(source)

An opaque data structure which represents an asynchronous queue.

It should only be accessed through the g_async_queue_* functions.

Skipped during bindings generation

  • parameter item_free_func: DestroyNotify

Constructors

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

Types

Link copied to clipboard
object Companion

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 override fun addCleaner(cleaner: <Error class: unknown class>): Boolean

Registers a cleaner to be executed when this proxy object is garbage collected.

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
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. You do not need to hold the lock to call this function.

Link copied to clipboard

This is deprecated since version 2.8.

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

Remove an item from the queue.

Link copied to clipboard
open override fun removeCleaner(cleaner: <Error class: unknown class>): Boolean

Removes a previously registered cleaner from this proxy object.

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>?

This is deprecated.

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

This is deprecated.

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

This is deprecated since version 2.8.