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

The broadcast method is unsafe #12

Open
andersea opened this issue Dec 30, 2022 · 1 comment
Open

The broadcast method is unsafe #12

andersea opened this issue Dec 30, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@andersea
Copy link
Owner

The way broadcasting to taps and extensions works currently is not safe. It should support backpressure, but currently messages just pile up in a big queue, leading to possible memory leaks and other unpleasant issues. This needs a thorough rethink. There is a lot of discussion available on the issue of broadcasting in the trio community as well.

See for instance: python-trio/trio#987

@andersea andersea added the bug Something isn't working label Dec 30, 2022
@andersea andersea self-assigned this Dec 30, 2022
@andersea
Copy link
Owner Author

andersea commented Jan 26, 2024

Naive attemp to make broadcasting safer has been added in the safe-broadcasting branch. It simply wraps the send loop in a separate nursery, which will have the effect of not allowing the source iteration to continue until all sends have completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant