Hi, thanks for this awesome lib.
In thpool.c (line 37), here is static volatile int threads_keepalive; , why not put threads_keepalive on struct thpool_?
Assume the following scenario:
- Create thread pool A (Now
threads_keepalive is set to 1);
- Call
add_task on thread pool A;
- Create thread pool B (Now
threads_keepalive is set to 1);
- Call
add_task on thread pool B;
- Destroy thread pool A (Now
threads_keepalive is set to 0);
- Call
add_task on thread pool B ; ( task won't execute, because of threads_keepalive == 0 )
Hi, thanks for this awesome lib.
In thpool.c (line 37), here is
static volatile int threads_keepalive;, why not putthreads_keepaliveonstruct thpool_?Assume the following scenario:
threads_keepaliveis set to 1);add_taskon thread pool A;threads_keepaliveis set to 1);add_taskon thread pool B;threads_keepaliveis set to 0);add_taskon thread pool B ; ( task won't execute, because ofthreads_keepalive == 0)