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

Documentation for runtime suspension #3152

Merged
merged 6 commits into from
Feb 8, 2018

Conversation

msimberg
Copy link
Contributor

@msimberg msimberg commented Feb 7, 2018

Completes #3003.

Proposed Changes

  • Add a section to the manual on how to suspend and resume the runtime, and a short motivation on why one might want to do this
  • Move thread_pool_base out of the detail namespace as it's part of the public API
  • Document member functions in thread_pool_base related to suspension
  • Update docs CMakeLists.txt and hpx.idx to include new documentation

Note: all non-suspension related functions in thread_pool_base are still hidden in the documentation as I'm not sure how many of them should/would be used by a normal user. Most of them will need to be documented eventually though, but that's independent of this PR.

@hkaiser hkaiser added this to the 1.1.0 milestone Feb 7, 2018
@msimberg msimberg mentioned this pull request Feb 7, 2018
4 tasks
Copy link
Member

@sithhell sithhell left a comment

Choose a reason for hiding this comment

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

Just a minor comment, looks good otherwise!


In some applications it is required to combine __hpx__ with other runtimes. To
support this use case __hpx__ provides two functions: [funcref hpx::suspend
`hpx::suspend`] and [funcref hpx::resume `hpx::resume`]. [funcref hpx::resume
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a typo. Did you mean to write [funcref hpx::suspend at the end of this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Line 193? Yes, that's intentional. Maybe the linebreak looks odd in the middle of the funcref thing but boostbook handles that well.

Copy link
Member

Choose a reason for hiding this comment

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

No, I'm pretty sure you meant suspend and not resume at the end of this line. Suspend blocks, resume doesn't.

Copy link
Member

Choose a reason for hiding this comment

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

Essentially, what's written is this:

[funcref hpx::resume hpx::suspend] is a blocking call which will wait for all scheduled tasks to finish executing and then put the thread pool OS threads to sleep.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sithhell you're very much right, I was blind. Thanks for spotting that!

@msimberg msimberg merged commit e8ce5c3 into STEllAR-GROUP:master Feb 8, 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.

3 participants