Control the thread pool behaviour
#include <sys/iofunc.h>
#include <sys/dispatch.h>
thread_pool_control( thread_pool_t * pool,
thread_pool_attr_t * attr,
uint16_t lower,
uint16_t upper,
unsigned flags )
libc
The thread_pool_control() function is used to specify the thread pool behaviour and adjust the attributes of the thread pool.
The following values may be set in flags:
This function blocks until the number of threads created is between the range of upper and lower respectively, unless the THREAD_POOL_CONTROL_NONBLOCK bit is set in flags.
![]() |
Having several threads call this function with the same thread pool handle isn't recommended. |
-1 if an error occurs (errno is set).
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |
thread_pool_destroy(), thread_pool_create(), thread_pool_limits(), thread_pool_start()