-
Notifications
You must be signed in to change notification settings - Fork 145
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
Timers will cancel on shutdown #181
Conversation
I have tests for this that I can push, but they need #184 to be merged first |
Looks like it needs to be rebased or merged now (I prefer rebase, but up to you). |
👍
It's fine, all actions are executed in the asyncio run loop, and so are all event handlers, so it's all single threaded. |
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
Yeah, I'll rebase it in the morning
|
- By default, a shutdown event will cancel timers - The timers used to send SIGKILL and SIGTERM to processes don't cancel on shutdown
- Check that timers will shut down a launched system - Check that shutdown will cancel a timer without cancel_on_shutdown=False - Check that shutdown will not cancel a timre with cancel_on_shutdown=True
@wjwwood This should be good to go. Some new tests added for the new timer behavior |
Signed-off-by: William Woodall <william@osrfoundation.org>
From issue #180
The only TimerActions I found in launch are the sigterm timer and sigkill timer in launch/actions/execute_process.py. I've set these up to not cancel on shutdown
@wjwwood I'm a little concerned about the thread safety note here. I didn't deep dive the thread model for event EventHandler actions. Do I need to be more cautious about calling self.cancel from an OpaqueFunction in TimerAction.execute?
Todo: