-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add wait_for_shutdown
utility
#29
Add wait_for_shutdown
utility
#29
Conversation
wait_for_shutdown
utilitywait_for_shutdown
utility
6956fab
to
cf0cb23
Compare
wait_for_shutdown
utilitywait_for_shutdown
utility
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.
Similar question to the other threaded PRs: does this shut down only the work being done on that thread, or does it shut down the executor globally?
On a second thought, one could also disable background spinning and spin explicitly in the main thread. I'll add that option too. |
cf0cb23
to
4761403
Compare
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.
The wait_fot_shutdown
portion looks straightforward and convenient, will approve after #32 is merged and this is rebased.
Signed-off-by: Michel Hidalgo <[email protected]>
4761403
to
01bab4c
Compare
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.
LGTM, essentially a 1:1 breakout of the prior code into a useful helper.
This patch brings a
wait_for_shutdown
utility to wait for a given context to shutdown. Useful to block the main thread while callbacks are invoked in the background. Builds on #32.