Skip to content
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

Merged
merged 5 commits into from
Jan 18, 2021
Merged

We aint got zombie shields #188

merged 5 commits into from
Jan 18, 2021

Conversation

goodboy
Copy link
Owner

@goodboy goodboy commented Jan 9, 2021

@guilledk that thing i was talkin bout..

This definitely pertains to #145 but does not yet solve it.

@goodboy goodboy added bug Something isn't working help wanted Extra attention is needed discussion experiment Exploratory design and testing labels Jan 9, 2021
@goodboy goodboy force-pushed the we_aint_got_zombie_shields branch from 585c4ee to e662269 Compare January 9, 2021 02:13
@goodboy goodboy force-pushed the we_aint_got_zombie_shields branch 2 times, most recently from 0811c99 to ceae999 Compare January 9, 2021 03:19
@goodboy goodboy requested a review from guilledk January 11, 2021 23:09
@@ -0,0 +1,45 @@
import trio
Copy link
Owner Author

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):
Copy link
Owner Author

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.
@goodboy goodboy force-pushed the we_aint_got_zombie_shields branch from ceae999 to 9f4e497 Compare January 14, 2021 23:21
@goodboy goodboy merged commit d8b6c00 into master Jan 18, 2021
@goodboy goodboy deleted the we_aint_got_zombie_shields branch January 18, 2021 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discussion experiment Exploratory design and testing help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant