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

Fix locking problems during shutdown #3209

Merged
merged 2 commits into from Mar 4, 2018

Conversation

msimberg
Copy link
Contributor

@msimberg msimberg commented Mar 1, 2018

This is to test if this helps for the Windows shutdown problems, but I will still see if we can get by with the stopped_ and terminated_ flags being atomic<bool>s instead (the mutex has to be locked in any case for the condition variables).

Proposed Changes

Any background context you want to provide?

HPX threads can migrate between OS threads. Holding an OS mutex in an HPX thread which gets migrated to another OS thread is undefined behaviour (this is checked on Windows). For #3203 a mutex was being held while being destructed.

@hkaiser
Copy link
Member

hkaiser commented Mar 1, 2018

This might actually make #3203 obsolete.

Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants