gi-gst-1.0.11: GStreamer bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
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 #

Instances

BoxedObject AtomicQueue Source # 
((~) * info (ResolveAtomicQueueMethod t AtomicQueue), MethodInfo * info AtomicQueue p) => IsLabel t (AtomicQueue -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> AtomicQueue -> p #

((~) * info (ResolveAtomicQueueMethod t AtomicQueue), MethodInfo * info AtomicQueue p) => IsLabelProxy t (AtomicQueue -> p) Source # 
HasAttributeList * AtomicQueue Source # 
((~) * signature (m ()), MonadIO m) => MethodInfo * AtomicQueueUnrefMethodInfo AtomicQueue signature Source # 
((~) * signature (m ()), MonadIO m) => MethodInfo * AtomicQueueRefMethodInfo AtomicQueue signature Source # 
((~) * signature (Ptr () -> m ()), MonadIO m) => MethodInfo * AtomicQueuePushMethodInfo AtomicQueue signature Source # 
((~) * signature (m (Ptr ())), MonadIO m) => MethodInfo * AtomicQueuePopMethodInfo AtomicQueue signature Source # 
((~) * signature (m (Ptr ())), MonadIO m) => MethodInfo * AtomicQueuePeekMethodInfo AtomicQueue signature Source # 
((~) * signature (m Word32), MonadIO m) => MethodInfo * AtomicQueueLengthMethodInfo AtomicQueue signature Source # 
type AttributeList AtomicQueue Source # 

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.