Gst.AtomicQueue

Fields

None

Methods

class

new (initial_size)

length ()

peek ()

pop ()

push (data)

ref ()

unref ()

Details

class Gst.AtomicQueue

The Gst.AtomicQueue object implements a queue that can be used from multiple threads without performing any blocking operations.

classmethod new(initial_size)[source]
Parameters:

initial_size (int) – initial queue size

Returns:

a new Gst.AtomicQueue

Return type:

Gst.AtomicQueue

Create a new atomic queue instance. initial_size will be rounded up to the nearest power of 2 and used as the initial size of the queue.

length()[source]
Returns:

the number of elements in the queue.

Return type:

int

Get the amount of items in the queue.

peek()[source]
Returns:

the head element of self or None when the queue is empty.

Return type:

object or None

Peek the head element of the queue without removing it from the queue.

pop()[source]
Returns:

the head element of self or None when the queue is empty.

Return type:

object or None

Get the head element of the queue.

push(data)[source]
Parameters:

data (object or None) – the data

Append data to the tail of the queue.

ref()[source]

Increase the refcount of self.

unref()[source]

Unref self and free the memory when the refcount reaches 0.