cp_thread_pool holds a list of free threads (in wait mode). More...
#include <thread.h>
Data Fields | |
| int | size |
| current size | |
| int | min_size |
| initial size | |
| int | max_size |
| size limit | |
| int | running |
| cp_mutex * | pool_lock |
| to sync thread assignment and release | |
| cp_cond * | pool_cond |
| to sync thread assignment and release | |
| cp_list * | free_pool |
| holder for unused threads | |
| cp_hashlist * | in_use |
| holder for running threads | |
cp_thread_pool holds a list of free threads (in wait mode).
The list grows up to max_size, after which subsequent calls to cp_thread_pool_get will block, and calls to cp_thread_pool_get_nb will return NULL - until clients return their threads to the pool.
1.7.1