| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.GLib.Structs.AsyncQueue
Contents
Description
An opaque data structure which represents an asynchronous queue.
It should only be accessed through the g_async_queue_* functions.
Synopsis
- newtype AsyncQueue = AsyncQueue (ManagedPtr AsyncQueue)
- type family ResolveAsyncQueueMethod (t :: Symbol) o where ...
- data AsyncQueueLengthMethodInfo
- asyncQueueLength :: (HasCallStack, MonadIO m) => AsyncQueue -> m Int32
- data AsyncQueueLengthUnlockedMethodInfo
- asyncQueueLengthUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m Int32
- data AsyncQueueLockMethodInfo
- asyncQueueLock :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()
- asyncQueueNew :: (HasCallStack, MonadIO m) => m AsyncQueue
- asyncQueueNewFull :: (HasCallStack, MonadIO m) => Maybe DestroyNotify -> m AsyncQueue
- data AsyncQueuePopMethodInfo
- asyncQueuePop :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())
- data AsyncQueuePopUnlockedMethodInfo
- asyncQueuePopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())
- data AsyncQueuePushMethodInfo
- asyncQueuePush :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()
- data AsyncQueuePushFrontMethodInfo
- asyncQueuePushFront :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()
- data AsyncQueuePushFrontUnlockedMethodInfo
- asyncQueuePushFrontUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()
- data AsyncQueuePushSortedMethodInfo
- asyncQueuePushSorted :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> CompareDataFunc -> m ()
- data AsyncQueuePushSortedUnlockedMethodInfo
- asyncQueuePushSortedUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> CompareDataFunc -> m ()
- data AsyncQueuePushUnlockedMethodInfo
- asyncQueuePushUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m ()
- data AsyncQueueRefMethodInfo
- asyncQueueRef :: (HasCallStack, MonadIO m) => AsyncQueue -> m AsyncQueue
- data AsyncQueueRefUnlockedMethodInfo
- asyncQueueRefUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()
- data AsyncQueueRemoveMethodInfo
- asyncQueueRemove :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m Bool
- data AsyncQueueRemoveUnlockedMethodInfo
- asyncQueueRemoveUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Ptr () -> m Bool
- data AsyncQueueSortMethodInfo
- asyncQueueSort :: (HasCallStack, MonadIO m) => AsyncQueue -> CompareDataFunc -> m ()
- data AsyncQueueSortUnlockedMethodInfo
- asyncQueueSortUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> CompareDataFunc -> m ()
- data AsyncQueueTimedPopMethodInfo
- asyncQueueTimedPop :: (HasCallStack, MonadIO m) => AsyncQueue -> TimeVal -> m (Ptr ())
- data AsyncQueueTimedPopUnlockedMethodInfo
- asyncQueueTimedPopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> TimeVal -> m (Ptr ())
- data AsyncQueueTimeoutPopMethodInfo
- asyncQueueTimeoutPop :: (HasCallStack, MonadIO m) => AsyncQueue -> Word64 -> m (Ptr ())
- data AsyncQueueTimeoutPopUnlockedMethodInfo
- asyncQueueTimeoutPopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> Word64 -> m (Ptr ())
- data AsyncQueueTryPopMethodInfo
- asyncQueueTryPop :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())
- data AsyncQueueTryPopUnlockedMethodInfo
- asyncQueueTryPopUnlocked :: (HasCallStack, MonadIO m) => AsyncQueue -> m (Ptr ())
- data AsyncQueueUnlockMethodInfo
- asyncQueueUnlock :: (HasCallStack, MonadIO m) => AsyncQueue -> m ()
Exported types
newtype AsyncQueue Source #
Memory-managed wrapper type.
Constructors
| AsyncQueue (ManagedPtr AsyncQueue) |
Instances
Methods
Click to display all available methods, including inherited ones
Methods
length, lengthUnlocked, lock, pop, popUnlocked, push, pushFront, pushFrontUnlocked, pushSorted, pushSortedUnlocked, pushUnlocked, ref, refUnlocked, remove, removeUnlocked, sort, sortUnlocked, timedPop, timedPopUnlocked, timeoutPop, timeoutPopUnlocked, tryPop, tryPopUnlocked, unlock.
Getters
None.
Setters
None.
type family ResolveAsyncQueueMethod (t :: Symbol) o where ... Source #
Equations
length
data AsyncQueueLengthMethodInfo Source #
Instances
| (signature ~ m Int32, MonadIO m) => OverloadedMethod AsyncQueueLengthMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueLengthMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> m Int32 | Returns: the length of the |
Returns the length of the queue.
Actually this function returns the number of data items in
the queue minus the number of waiting threads, so a negative
value means waiting threads, and a positive value means available
entries in the queue. A return value of 0 could mean n entries
in the queue and n threads waiting. This can happen due to locking
of the queue or due to scheduling.
lengthUnlocked
data AsyncQueueLengthUnlockedMethodInfo Source #
Instances
| (signature ~ m Int32, MonadIO m) => OverloadedMethod AsyncQueueLengthUnlockedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueLengthUnlockedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
asyncQueueLengthUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> m Int32 | Returns: the length of the |
Returns the length of the queue.
Actually this function returns the number of data items in
the queue minus the number of waiting threads, so a negative
value means waiting threads, and a positive value means available
entries in the queue. A return value of 0 could mean n entries
in the queue and n threads waiting. This can happen due to locking
of the queue or due to scheduling.
This function must be called while holding the queue's lock.
lock
data AsyncQueueLockMethodInfo Source #
Instances
| (signature ~ m (), MonadIO m) => OverloadedMethod AsyncQueueLockMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueLockMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> m () |
Acquires the queue's lock. If another thread is already
holding the lock, this call will block until the lock
becomes available.
Call asyncQueueUnlock to drop the lock again.
While holding the lock, you can only call the
g_async_queue_*_unlocked() functions on queue. Otherwise,
deadlock may occur.
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m AsyncQueue | Returns: a new |
Creates a new asynchronous queue.
newFull
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Maybe DestroyNotify |
|
| -> m AsyncQueue | Returns: a new |
Creates a new asynchronous queue and sets up a destroy notify function that is used to free any remaining queue items when the queue is destroyed after the final unref.
Since: 2.16
pop
data AsyncQueuePopMethodInfo Source #
Instances
| (signature ~ m (Ptr ()), MonadIO m) => OverloadedMethod AsyncQueuePopMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueuePopMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> m (Ptr ()) | Returns: data from the queue |
Pops data from the queue. If queue is empty, this function
blocks until data becomes available.
popUnlocked
data AsyncQueuePopUnlockedMethodInfo Source #
Instances
| (signature ~ m (Ptr ()), MonadIO m) => OverloadedMethod AsyncQueuePopUnlockedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueuePopUnlockedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
asyncQueuePopUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> m (Ptr ()) | Returns: data from the queue. |
Pops data from the queue. If queue is empty, this function
blocks until data becomes available.
This function must be called while holding the queue's lock.
push
data AsyncQueuePushMethodInfo Source #
Instances
| (signature ~ (Ptr () -> m ()), MonadIO m) => OverloadedMethod AsyncQueuePushMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueuePushMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> Ptr () |
|
| -> m () |
Pushes the data into the queue.
The data parameter must not be Nothing.
pushFront
data AsyncQueuePushFrontMethodInfo Source #
Instances
| (signature ~ (Ptr () -> m ()), MonadIO m) => OverloadedMethod AsyncQueuePushFrontMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueuePushFrontMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> Ptr () |
|
| -> m () |
Pushes the item into the queue. item must not be Nothing.
In contrast to asyncQueuePush, this function
pushes the new item ahead of the items already in the queue,
so that it will be the next one to be popped off the queue.
Since: 2.46
pushFrontUnlocked
data AsyncQueuePushFrontUnlockedMethodInfo Source #
Instances
| (signature ~ (Ptr () -> m ()), MonadIO m) => OverloadedMethod AsyncQueuePushFrontUnlockedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueuePushFrontUnlockedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
asyncQueuePushFrontUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> Ptr () |
|
| -> m () |
Pushes the item into the queue. item must not be Nothing.
In contrast to asyncQueuePushUnlocked, this function
pushes the new item ahead of the items already in the queue,
so that it will be the next one to be popped off the queue.
This function must be called while holding the queue's lock.
Since: 2.46
pushSorted
data AsyncQueuePushSortedMethodInfo Source #
Instances
| (signature ~ (Ptr () -> CompareDataFunc -> m ()), MonadIO m) => OverloadedMethod AsyncQueuePushSortedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueuePushSortedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> Ptr () |
|
| -> CompareDataFunc |
|
| -> m () |
Inserts data into queue using func to determine the new
position.
This function requires that the queue is sorted before pushing on
new elements, see asyncQueueSort.
This function will lock queue before it sorts the queue and unlock
it when it is finished.
For an example of func see asyncQueueSort.
Since: 2.10
pushSortedUnlocked
data AsyncQueuePushSortedUnlockedMethodInfo Source #
Instances
| (signature ~ (Ptr () -> CompareDataFunc -> m ()), MonadIO m) => OverloadedMethod AsyncQueuePushSortedUnlockedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueuePushSortedUnlockedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
asyncQueuePushSortedUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> Ptr () |
|
| -> CompareDataFunc |
|
| -> m () |
Inserts data into queue using func to determine the new
position.
The sort function func is passed two elements of the queue.
It should return 0 if they are equal, a negative value if the
first element should be higher in the queue or a positive value
if the first element should be lower in the queue than the second
element.
This function requires that the queue is sorted before pushing on
new elements, see asyncQueueSort.
This function must be called while holding the queue's lock.
For an example of func see asyncQueueSort.
Since: 2.10
pushUnlocked
data AsyncQueuePushUnlockedMethodInfo Source #
Instances
| (signature ~ (Ptr () -> m ()), MonadIO m) => OverloadedMethod AsyncQueuePushUnlockedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueuePushUnlockedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
asyncQueuePushUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> Ptr () |
|
| -> m () |
Pushes the data into the queue.
The data parameter must not be Nothing.
This function must be called while holding the queue's lock.
ref
data AsyncQueueRefMethodInfo Source #
Instances
| (signature ~ m AsyncQueue, MonadIO m) => OverloadedMethod AsyncQueueRefMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueRefMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> m AsyncQueue | Returns: the |
Increases the reference count of the asynchronous queue by 1.
You do not need to hold the lock to call this function.
refUnlocked
data AsyncQueueRefUnlockedMethodInfo Source #
Instances
| (signature ~ m (), MonadIO m) => OverloadedMethod AsyncQueueRefUnlockedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueRefUnlockedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
asyncQueueRefUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> m () |
Deprecated: (Since version 2.8)Reference counting is done atomically.so asyncQueueRef can be used regardless of the queue'slock.
Increases the reference count of the asynchronous queue by 1.
remove
data AsyncQueueRemoveMethodInfo Source #
Instances
| (signature ~ (Ptr () -> m Bool), MonadIO m) => OverloadedMethod AsyncQueueRemoveMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueRemoveMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> Ptr () |
|
| -> m Bool | Returns: |
Remove an item from the queue.
Since: 2.46
removeUnlocked
data AsyncQueueRemoveUnlockedMethodInfo Source #
Instances
| (signature ~ (Ptr () -> m Bool), MonadIO m) => OverloadedMethod AsyncQueueRemoveUnlockedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueRemoveUnlockedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
asyncQueueRemoveUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> Ptr () |
|
| -> m Bool | Returns: |
Remove an item from the queue.
This function must be called while holding the queue's lock.
Since: 2.46
sort
data AsyncQueueSortMethodInfo Source #
Instances
| (signature ~ (CompareDataFunc -> m ()), MonadIO m) => OverloadedMethod AsyncQueueSortMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueSortMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> CompareDataFunc |
|
| -> m () |
Sorts queue using func.
The sort function func is passed two elements of the queue.
It should return 0 if they are equal, a negative value if the
first element should be higher in the queue or a positive value
if the first element should be lower in the queue than the second
element.
This function will lock queue before it sorts the queue and unlock
it when it is finished.
If you were sorting a list of priority numbers to make sure the lowest priority would be at the top of the queue, you could use:
C code
gint32 id1; gint32 id2; id1 = GPOINTER_TO_INT (element1); id2 = GPOINTER_TO_INT (element2); return (id1 > id2 ? +1 : id1 == id2 ? 0 : -1);
Since: 2.10
sortUnlocked
data AsyncQueueSortUnlockedMethodInfo Source #
Instances
| (signature ~ (CompareDataFunc -> m ()), MonadIO m) => OverloadedMethod AsyncQueueSortUnlockedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueSortUnlockedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
asyncQueueSortUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> CompareDataFunc |
|
| -> m () |
Sorts queue using func.
The sort function func is passed two elements of the queue.
It should return 0 if they are equal, a negative value if the
first element should be higher in the queue or a positive value
if the first element should be lower in the queue than the second
element.
This function must be called while holding the queue's lock.
Since: 2.10
timedPop
data AsyncQueueTimedPopMethodInfo Source #
Instances
| (signature ~ (TimeVal -> m (Ptr ())), MonadIO m) => OverloadedMethod AsyncQueueTimedPopMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueTimedPopMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> TimeVal |
|
| -> m (Ptr ()) | Returns: data from the queue or |
Deprecated: use asyncQueueTimeoutPop.
Pops data from the queue. If the queue is empty, blocks until
endTime or until data becomes available.
If no data is received before endTime, Nothing is returned.
To easily calculate endTime, a combination of getRealTime
and timeValAdd can be used.
timedPopUnlocked
data AsyncQueueTimedPopUnlockedMethodInfo Source #
Instances
| (signature ~ (TimeVal -> m (Ptr ())), MonadIO m) => OverloadedMethod AsyncQueueTimedPopUnlockedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueTimedPopUnlockedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
asyncQueueTimedPopUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> TimeVal |
|
| -> m (Ptr ()) | Returns: data from the queue or |
Deprecated: use asyncQueueTimeoutPopUnlocked.
Pops data from the queue. If the queue is empty, blocks until
endTime or until data becomes available.
If no data is received before endTime, Nothing is returned.
To easily calculate endTime, a combination of getRealTime
and timeValAdd can be used.
This function must be called while holding the queue's lock.
timeoutPop
data AsyncQueueTimeoutPopMethodInfo Source #
Instances
| (signature ~ (Word64 -> m (Ptr ())), MonadIO m) => OverloadedMethod AsyncQueueTimeoutPopMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueTimeoutPopMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> Word64 |
|
| -> m (Ptr ()) | Returns: data from the queue or |
Pops data from the queue. If the queue is empty, blocks for
timeout microseconds, or until data becomes available.
If no data is received before the timeout, Nothing is returned.
timeoutPopUnlocked
data AsyncQueueTimeoutPopUnlockedMethodInfo Source #
Instances
| (signature ~ (Word64 -> m (Ptr ())), MonadIO m) => OverloadedMethod AsyncQueueTimeoutPopUnlockedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueTimeoutPopUnlockedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
asyncQueueTimeoutPopUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> Word64 |
|
| -> m (Ptr ()) | Returns: data from the queue or |
Pops data from the queue. If the queue is empty, blocks for
timeout microseconds, or until data becomes available.
If no data is received before the timeout, Nothing is returned.
This function must be called while holding the queue's lock.
tryPop
data AsyncQueueTryPopMethodInfo Source #
Instances
| (signature ~ m (Ptr ()), MonadIO m) => OverloadedMethod AsyncQueueTryPopMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueTryPopMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> m (Ptr ()) | Returns: data from the queue or |
Tries to pop data from the queue. If no data is available,
Nothing is returned.
tryPopUnlocked
data AsyncQueueTryPopUnlockedMethodInfo Source #
Instances
| (signature ~ m (Ptr ()), MonadIO m) => OverloadedMethod AsyncQueueTryPopUnlockedMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueTryPopUnlockedMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
asyncQueueTryPopUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> m (Ptr ()) | Returns: data from the queue or |
Tries to pop data from the queue. If no data is available,
Nothing is returned.
This function must be called while holding the queue's lock.
unlock
data AsyncQueueUnlockMethodInfo Source #
Instances
| (signature ~ m (), MonadIO m) => OverloadedMethod AsyncQueueUnlockMethodInfo AsyncQueue signature Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods overloadedMethod :: AsyncQueue -> signature # | |
| OverloadedMethodInfo AsyncQueueUnlockMethodInfo AsyncQueue Source # | |
Defined in GI.GLib.Structs.AsyncQueue Methods | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AsyncQueue |
|
| -> m () |
Releases the queue's lock.
Calling this function when you have not acquired
the with asyncQueueLock leads to undefined
behaviour.