-
Notifications
You must be signed in to change notification settings - Fork 21
[EXP-27] Watch tasks and handle exit #233
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
Conversation
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.
Looks good, should we re-export this in common and/or maybe move it under util?
3676093 to
c9d0ec7
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.
Main issue is that this treats async tasks like sync ones, expecting them to poll a handle when we should drop them directly with Abortable. Secondarily, sync tasks that wait on a channel are a bit tricky to deal with here since we'd somehow want to interrupt the channel recv so that we can monitor the guard in blocking way. A lazy way to do this is with a timeout but there might be a better one that's not too invasive.
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.
Minor question, looks good otherwise.
add interrupt signal listener
use shutdown signal
df25ee9 to
96f3880
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.
It can be merged as it is.
I have some minor nits and a big question on UnwindSafe bounds that I do know the answer.
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.
ACK f617586
Description
Following similar pattern to how Reth's task manager is implemented
Type of Change
Checklist
Related Issues