Open wind0ws opened 4 years ago
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_?
static volatile int threads_keepalive;
threads_keepalive
struct thpool_
Assume the following scenario:
add_task
threads_keepalive == 0
Just stumbled with similar issue. In my application, thread pool B isn't scheduling tasks if thread pool A is destroyed.
Hi, thanks for this awesome lib.
In thpool.c (line 37), here is
static volatile int threads_keepalive;
, why not putthreads_keepalive
onstruct thpool_
?Assume the following scenario:
threads_keepalive
is set to 1);add_task
on thread pool A;threads_keepalive
is set to 1);add_task
on thread pool B;threads_keepalive
is set to 0);add_task
on thread pool B ; ( task won't execute, because ofthreads_keepalive == 0
)