GLib.AsyncQueue.length_unlocked

### Method

# GLib AsyncQueuelength_unlocked

#### Declaration

    gint
    g_async_queue_length_unlocked (
      GAsyncQueue* queue
    )

#### Description

Returns the length of the queue.

Actually this function returns the number of data items in the queue minus the number of waiting threads, so a negative value means waiting threads, and a positive value means available entries in the `queue`. A return value of 0 could mean n entries in the queue and n threads waiting. This can happen due to locking of the queue or due to scheduling.

This function must be called while holding the `queue`‘s lock.

#### Return value

Type: `gint`

The length of the `queue`.