PoolingThreadHandlerProvider
class PoolingThreadHandlerProvider(val poolSize: Int = DEFAULT_POOL_SIZE, priority: Int = DEFAULT_BACKGROUND_THREAD_PRIORITY) : RunnableHandlerProvider
A thread pool provider that manages a pool of background handler threads for executing tasks.
This class creates a fixed pool of HandlerThread instances and provides round-robin access to their handlers. The active pool size can be dynamically adjusted to control how many threads are actually used from the pool.
Parameters
poolSize
The total number of handler threads to create in the pool
priority
The thread priority for all handler threads in the pool
Properties
Link copied to clipboard
The number of threads from the pool that are currently active. Must not exceed poolSize. When set, only this many threads will be used in round-robin fashion from the available pool.