Companion
Functions
This function will return the maximum @interval that a thread will wait in the thread pool for new tasks before being stopped.
Returns the maximal allowed number of unused threads.
Returns the number of currently unused threads.
This function creates a new thread pool.
This function creates a new thread pool similar to g_thread_pool_new() but allowing @item_free_func to be specified to free the data passed to g_thread_pool_push() in the case that the #GThreadPool is stopped and freed before all tasks have been executed.
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 g_thread_pool_stop_unused_threads() on a regular timeout, except this is done on a per thread basis.
Sets the maximal number of unused threads to @max_threads. If @max_threads is -1, no limit is imposed on the number of unused threads.
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().