| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.Gst.Structs.AtomicQueue
Description
The AtomicQueue object implements a queue that can be used from multiple
threads without performing any blocking operations.
Synopsis
- newtype AtomicQueue = AtomicQueue (ManagedPtr AtomicQueue)
- atomicQueueLength :: (HasCallStack, MonadIO m) => AtomicQueue -> m Word32
- atomicQueueNew :: (HasCallStack, MonadIO m) => Word32 -> m AtomicQueue
- atomicQueuePeek :: (HasCallStack, MonadIO m) => AtomicQueue -> m (Ptr ())
- atomicQueuePop :: (HasCallStack, MonadIO m) => AtomicQueue -> m (Ptr ())
- atomicQueuePush :: (HasCallStack, MonadIO m) => AtomicQueue -> Ptr () -> m ()
- atomicQueueRef :: (HasCallStack, MonadIO m) => AtomicQueue -> m ()
- atomicQueueUnref :: (HasCallStack, MonadIO m) => AtomicQueue -> m ()
Exported types
newtype AtomicQueue Source #
Memory-managed wrapper type.
Constructors
| AtomicQueue (ManagedPtr AtomicQueue) |
Instances
| Eq AtomicQueue Source # | |
Defined in GI.Gst.Structs.AtomicQueue | |
| GBoxed AtomicQueue Source # | |
Defined in GI.Gst.Structs.AtomicQueue | |
| ManagedPtrNewtype AtomicQueue Source # | |
Defined in GI.Gst.Structs.AtomicQueue Methods toManagedPtr :: AtomicQueue -> ManagedPtr AtomicQueue | |
| TypedObject AtomicQueue Source # | |
Defined in GI.Gst.Structs.AtomicQueue | |
| HasParentTypes AtomicQueue Source # | |
Defined in GI.Gst.Structs.AtomicQueue | |
| IsGValue (Maybe AtomicQueue) Source # | Convert |
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 # | |
Defined in GI.Gst.Structs.AtomicQueue | |
Methods
Click to display all available methods, including inherited ones
length
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AtomicQueue |
|
| -> m Word32 | Returns: the number of elements in the queue. |
Get the amount of items in the queue.
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Word32 |
|
| -> m AtomicQueue | Returns: a new |
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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AtomicQueue |
|
| -> m (Ptr ()) | Returns: the head element of |
Peek the head element of the queue without removing it from the queue.
pop
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AtomicQueue |
|
| -> m (Ptr ()) | Returns: the head element of |
Get the head element of the queue.
push
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AtomicQueue |
|
| -> Ptr () |
|
| -> m () |
Append data to the tail of the queue.
ref
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AtomicQueue |
|
| -> m () |
Increase the refcount of queue.
unref
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AtomicQueue |
|
| -> m () |
Unref queue and free the memory when the refcount reaches 0.