Convenience wrapper function for thread_pool_control()
#include <sys/iofunc.h>
#include <sys/dispatch.h>
int thread_pool_limits( thread_pool_t * pool,
int lowater,
int hiwater,
int maximum,
int increment,
unsigned flags );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The thread_pool_limits() function is a wrapper function for thread_pool_control(). If the value of lowater, hiwater, maximum or increment is ≥0 then that value is adjusted in the thread pool according to the handle pool.
If you don't set THREAD_POOL_CONTROL_NONBLOCK, the upper and lower bounds for waiting are:
-1 if an error occurs (errno is set).
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |