-
Notifications
You must be signed in to change notification settings - Fork 646
question about threads_keepalive variable. #88
Copy link
Copy link
Open
Description
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_keepaliveis set to 1); - Call
add_taskon thread pool A; - Create thread pool B (Now
threads_keepaliveis set to 1); - Call
add_taskon thread pool B; - Destroy thread pool A (Now
threads_keepaliveis set to 0); - Call
add_taskon thread pool B ; ( task won't execute, because ofthreads_keepalive == 0)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels