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 |
The SharedTaskPool
object.
Since: 1.20
Synopsis
- newtype SharedTaskPool = SharedTaskPool (ManagedPtr SharedTaskPool)
- class (GObject o, IsDescendantOf SharedTaskPool o) => IsSharedTaskPool o
- toSharedTaskPool :: (MonadIO m, IsSharedTaskPool o) => o -> m SharedTaskPool
- sharedTaskPoolGetMaxThreads :: (HasCallStack, MonadIO m, IsSharedTaskPool a) => a -> m Word32
- sharedTaskPoolNew :: (HasCallStack, MonadIO m) => m SharedTaskPool
- sharedTaskPoolSetMaxThreads :: (HasCallStack, MonadIO m, IsSharedTaskPool a) => a -> Word32 -> m ()
Exported types
newtype SharedTaskPool Source #
Memory-managed wrapper type.
SharedTaskPool (ManagedPtr SharedTaskPool) |
Instances
class (GObject o, IsDescendantOf SharedTaskPool o) => IsSharedTaskPool o Source #
Type class for types which can be safely cast to SharedTaskPool
, for instance with toSharedTaskPool
.
Instances
toSharedTaskPool :: (MonadIO m, IsSharedTaskPool o) => o -> m SharedTaskPool Source #
Cast to SharedTaskPool
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
addControlBinding, bindProperty, bindPropertyFull, cleanup, defaultError, disposeHandle, forceFloating, freezeNotify, getv, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, isFloating, join, notify, notifyByPspec, prepare, push, ref, refSink, removeControlBinding, runDispose, stealData, stealQdata, suggestNextSync, syncValues, thawNotify, unparent, unref, watchClosure.
Getters
getControlBinding, getControlRate, getData, getGValueArray, getMaxThreads, getName, getParent, getPathString, getProperty, getQdata, getValue.
Setters
setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setData, setDataFull, setMaxThreads, setName, setParent, setProperty.
getMaxThreads
sharedTaskPoolGetMaxThreads Source #
:: (HasCallStack, MonadIO m, IsSharedTaskPool a) | |
=> a |
|
-> m Word32 | Returns: the maximum number of threads |
No description available in the introspection data.
Since: 1.20
new
:: (HasCallStack, MonadIO m) | |
=> m SharedTaskPool | Returns: a new |
Create a new shared task pool. The shared task pool will queue tasks on a maximum number of threads, 1 by default.
Do not use a SharedTaskPool
to manage potentially inter-dependent tasks such
as pad tasks, as having one task waiting on another to return before returning
would cause obvious deadlocks if they happen to share the same thread.
Since: 1.20
setMaxThreads
sharedTaskPoolSetMaxThreads Source #
:: (HasCallStack, MonadIO m, IsSharedTaskPool a) | |
=> a |
|
-> Word32 |
|
-> m () |
Update the maximal number of threads the pool
may spawn. When
the maximal number of threads is reduced, existing threads are not
immediately shut down, see threadPoolSetMaxThreads
.
Setting maxThreads
to 0 effectively freezes the pool.
Since: 1.20