gi-gst-1.0.20: GStreamer bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gst.Structs.AtomicQueue

Contents

Description

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

Synopsis

Exported types

newtype AtomicQueue Source #

Memory-managed wrapper type.

Constructors

AtomicQueue (ManagedPtr AtomicQueue) 
Instances
BoxedObject AtomicQueue Source # 
Instance details

Defined in GI.Gst.Structs.AtomicQueue

Methods

boxedType :: AtomicQueue -> IO GType

Methods

length

atomicQueueLength Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AtomicQueue

queue: a AtomicQueue

-> m Word32

Returns: the number of elements in the queue.

Get the amount of items in the queue.

new

atomicQueueNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

initialSize: initial queue size

-> m AtomicQueue

Returns: a new AtomicQueue

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

peek

atomicQueuePeek Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AtomicQueue

queue: a AtomicQueue

-> m (Ptr ())

Returns: the head element of queue or Nothing when the queue is empty.

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

pop

atomicQueuePop Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AtomicQueue

queue: a AtomicQueue

-> m (Ptr ())

Returns: the head element of queue or Nothing when the queue is empty.

Get the head element of the queue.

push

atomicQueuePush Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AtomicQueue

queue: a AtomicQueue

-> Ptr ()

data: the data

-> m () 

Append data to the tail of the queue.

ref

atomicQueueRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AtomicQueue

queue: a AtomicQueue

-> m () 

Increase the refcount of queue.

unref

atomicQueueUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> AtomicQueue

queue: a AtomicQueue

-> m () 

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