-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed various threadpool errors #1
Conversation
I think for the double-decrement of |
I don't think the decrement in a thread function is a good idea by the several reasons:
|
We can remove the check for
We can just do: if (pthread_create(&thread->handle, NULL, threadpool_do_work, thread))
threadpool->num_threads--;
The problem with decrementing |
Looks like does not pass build. |
threadpool->num_threads
threadpool->stop
and reading in threads