-
Notifications
You must be signed in to change notification settings - Fork 12
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
We aint got zombie shields #188
Conversation
585c4ee
to
e662269
Compare
0811c99
to
ceae999
Compare
@@ -0,0 +1,45 @@ | |||
import trio |
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 is just an example that shows the hang in practice.
The problem is if we have a nursery exit before receiving a ctr-c we'll be stuck in the shielded proc.wait()
and have no way for the user to trigger graceful exit...
# always "hard" join sub procs: | ||
# no actor zombies allowed | ||
with trio.CancelScope(shield=True): | ||
await proc.wait() | ||
# with trio.CancelScope(shield=True): |
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 main change.
Thoughts on this very welcome.
Using `None` as the default key for a `@msg.pub` can cause conflicts if there is more then one "taskless" (no tasks={,} passed) pub offered on an actor... So instead use the first trio "task name" (usually just the function name) instead thus avoiding this very hard to debug and understand problem. Probably should throw in a test but I'm super lazy today.
ceae999
to
9f4e497
Compare
@guilledk that thing i was talkin bout..
This definitely pertains to #145 but does not yet solve it.