Class
DexThreadPool
unstable since: 1.2
Description [src]
final class Dex.ThreadPool : GObject.TypeInstance
{
/* No available fields */
}
DexThreadPool is a thread pool for managing native OS threads similar
to GThreadPool.
The threads managed by DexThreadPool do not contain a
DexScheduler which means that you cannot await
futures or schedule DexBlock from a worker thread.
Threads are created up-front from dex_thread_pool_new().
DexThreadPool primarily exists for situations where you are
using blocking external libraries and want to avoid calling
dex_thread_spawn() without any sort of queuing or bounding
on the permitted concurrency.
Available since: 1.2
Constructors
dex_thread_pool_new
Creates a fixed-size pool of reusable operating system threads.
unstable since: 1.2
Instance methods
dex_thread_pool_get_n_threads
Gets the fixed number of threads owned by the pool.
unstable since: 1.2
dex_thread_pool_submit
Queues blocking work to run on one of the pool’s reusable threads.
unstable since: 1.2