gi-gst-1.0.24: GStreamer bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gst.Structs.AtomicQueue

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

Instances details
Eq AtomicQueue Source # 
Instance details

Defined in GI.Gst.Structs.AtomicQueue

GBoxed AtomicQueue Source # 
Instance details

Defined in GI.Gst.Structs.AtomicQueue

ManagedPtrNewtype AtomicQueue Source # 
Instance details

Defined in GI.Gst.Structs.AtomicQueue

Methods

toManagedPtr :: AtomicQueue -> ManagedPtr AtomicQueue

TypedObject AtomicQueue Source # 
Instance details

Defined in GI.Gst.Structs.AtomicQueue

Methods

glibType :: IO GType

HasParentTypes AtomicQueue Source # 
Instance details

Defined in GI.Gst.Structs.AtomicQueue

IsGValue (Maybe AtomicQueue) Source #

Convert AtomicQueue to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gst.Structs.AtomicQueue

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe AtomicQueue -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe AtomicQueue)

type ParentTypes AtomicQueue Source # 
Instance details

Defined in GI.Gst.Structs.AtomicQueue

type ParentTypes AtomicQueue = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

length, peek, pop, push, ref, unref.

Getters

None.

Setters

None.

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.