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

Suspend thread pool #3110

Merged
merged 10 commits into from Jan 25, 2018
Merged

Suspend thread pool #3110

merged 10 commits into from Jan 25, 2018

Conversation

msimberg
Copy link
Contributor

@msimberg msimberg commented Jan 18, 2018

Proposed Changes

#3080 plus some.

There was a deadlock during an exceptional shutdown which this fixes by adding a non-blocking version of resume to thread_pool_base.

This also makes it clearer when it is possible to suspend the OS thread on which the suspending HPX thread is running.

Any background context you want to provide?

See #3080 and #3108.

…dlock during exceptional shutdown

Previously stop_locked would block on calling resume_internal, even if blocking was set to false. This lead to deadlocks when multiple threads call stop_locked and assume that only one of them has blocking set to true.
Wrong function name passed to HPX_THROWS_IF
- Make sure there is an idle thread which can do the stealing
- Add comments to warn about corner cases
Change state_suspended to state_sleeping.
I.e. don't use pending_boost to let other work run first.
@msimberg msimberg requested a review from hkaiser January 22, 2018 09:15
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 a lot!

@msimberg msimberg changed the title WIP: Suspend thread pool Suspend thread pool Jan 25, 2018
@msimberg msimberg mentioned this pull request Jan 25, 2018
@hkaiser hkaiser merged commit 0867f8a into STEllAR-GROUP:master Jan 25, 2018
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