Hoogle Search
Within LTS Haskell 24.67 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
threadPoolGetMaxUnusedThreads :: (HasCallStack, MonadIO m) => m Int32gi-glib GI.GLib.Structs.ThreadPool Returns the maximal allowed number of unused threads.
threadPoolGetNumThreads :: (HasCallStack, MonadIO m) => ThreadPool -> m Word32gi-glib GI.GLib.Structs.ThreadPool Returns the number of threads currently running in pool.
threadPoolGetNumUnusedThreads :: (HasCallStack, MonadIO m) => m Word32gi-glib GI.GLib.Structs.ThreadPool Returns the number of currently unused threads.
threadPoolMoveToFront :: (HasCallStack, MonadIO m) => ThreadPool -> Ptr () -> m Boolgi-glib GI.GLib.Structs.ThreadPool Moves the item to the front of the queue of unprocessed items, so that it will be processed next. Since: 2.46
threadPoolPush :: (HasCallStack, MonadIO m) => ThreadPool -> Ptr () -> m ()gi-glib GI.GLib.Structs.ThreadPool Inserts data into the list of tasks to be executed by pool. When the number of currently running threads is lower than the maximal allowed number of threads, a new thread is started (or reused) with the properties given to g_thread_pool_new(). Otherwise, data stays in the queue until a thread in this pool finishes its previous task and processes data. error can be Nothing to ignore errors, or non-Nothing to report errors. An error can only occur when a new thread couldn't be created. In that case data is simply appended to the queue of work to do. Before version 2.32, this function did not return a success status.
threadPoolSetMaxIdleTime :: (HasCallStack, MonadIO m) => Word32 -> m ()gi-glib GI.GLib.Structs.ThreadPool This function will set the maximum interval that a thread waiting in the pool for new tasks can be idle for before being stopped. This function is similar to calling threadPoolStopUnusedThreads on a regular timeout, except this is done on a per thread basis. By setting interval to 0, idle threads will not be stopped. The default value is 15000 (15 seconds). Since: 2.10
threadPoolSetMaxThreads :: (HasCallStack, MonadIO m) => ThreadPool -> Int32 -> m ()gi-glib GI.GLib.Structs.ThreadPool Sets the maximal allowed number of threads for pool. A value of -1 means that the maximal number of threads is unlimited. If pool is an exclusive thread pool, setting the maximal number of threads to -1 is not allowed. Setting maxThreads to 0 means stopping all work for pool. It is effectively frozen until maxThreads is set to a non-zero value again. A thread is never terminated while calling func, as supplied by g_thread_pool_new(). Instead the maximal number of threads only has effect for the allocation of new threads in threadPoolPush. A new thread is allocated, whenever the number of currently running threads in pool is smaller than the maximal number. error can be Nothing to ignore errors, or non-Nothing to report errors. An error can only occur when a new thread couldn't be created. Before version 2.32, this function did not return a success status.
threadPoolSetMaxUnusedThreads :: (HasCallStack, MonadIO m) => Int32 -> m ()gi-glib GI.GLib.Structs.ThreadPool Sets the maximal number of unused threads to maxThreads. If maxThreads is -1, no limit is imposed on the number of unused threads. The default value is 2.
threadPoolStopUnusedThreads :: (HasCallStack, MonadIO m) => m ()gi-glib GI.GLib.Structs.ThreadPool Stops all currently unused threads. This does not change the maximal number of unused threads. This function can be used to regularly stop all unused threads e.g. from g_timeout_add().
threadPoolUnprocessed :: (HasCallStack, MonadIO m) => ThreadPool -> m Word32gi-glib GI.GLib.Structs.ThreadPool Returns the number of tasks still unprocessed in pool.