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

timeout on send #281

Closed
plastikfan opened this issue Jun 4, 2024 · 0 comments · Fixed by #286
Closed

timeout on send #281

plastikfan opened this issue Jun 4, 2024 · 0 comments · Fixed by #286
Assignees
Labels
feature New feature or request

Comments

@plastikfan
Copy link
Contributor

plastikfan commented Jun 4, 2024

The correct way to implement 'cancelling the parent from a child'. Instead of passing in the cancel func from parent to child, the parent listens on a specific cancellation channel. The parent passes the channel to the child. Each time the child attempts to send an output to the output channel, it does so with a newly create time-out context. If that time-out occurs, then the child sends a cancellation notification on the cancel channel. The parent on seeing this cancelation request will invoke cancel on the context, resulting in the entire worker-pool shutting down.

See:

@plastikfan plastikfan added the feature New feature or request label Jun 4, 2024
@plastikfan plastikfan self-assigned this Jun 4, 2024
@plastikfan plastikfan changed the title add a cancellation channel implement timeout on send Jun 5, 2024
@plastikfan plastikfan changed the title implement timeout on send timeout on send Jun 5, 2024
@plastikfan plastikfan linked a pull request Jun 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant