Skip to content
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

Make keepalive variable local #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

forGGe
Copy link

@forGGe forGGe commented Apr 13, 2021

This should prevent the race conditions when destroying and initializing multiple threadpools at the same time

Also see #88

This should prevent the race conditions when destroying and initializing
multiple threadpools at the same time
@sl1200mk2
Copy link

I'm fully agree with this proposal.
++

@@ -53,11 +53,8 @@
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)

static volatile int threads_keepalive;
static volatile int threads_on_hold;
Copy link
Owner

@Pithikos Pithikos Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that if we are to fix this, we should also consider an approach for threads_on_hold

Also some test coverage would be nice demonstrating the original issue and to avoid regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants