-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Conversation
- Move thread_pool_base out of detail namespace because it is part of the public API - Document suspension functions in thread_pool_base, hide others in documentation
Add notes on where functions can be called and what they can throw.
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
Completes #3003.
Proposed Changes
thread_pool_base
out of the detail namespace as it's part of the public APIthread_pool_base
related to suspensionCMakeLists.txt
andhpx.idx
to include new documentationNote: 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.