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

Check select! bug in async #49

Open
joshka opened this issue Mar 4, 2024 · 3 comments
Open

Check select! bug in async #49

joshka opened this issue Mar 4, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@joshka
Copy link
Member

joshka commented Mar 4, 2024

I suspect that this is still a bug as the select can complete on either branch of the select in a non-deterministic fashion. The right way to handle (I think) is to not fail when the sender fails to send. The send failing can indicator that the receiver is closed. See https://docs.rs/tokio/latest/tokio/sync/mpsc/struct.Sender.html

I think there's probably a second bug with this in how cancelations are handled https://docs.rs/tokio/latest/tokio/sync/mpsc/struct.Sender.html#cancel-safety

Originally posted by @joshka in #48 (review)

@MMitsuha
Copy link
Contributor

MMitsuha commented Mar 4, 2024

Sorry for late response, I am in school now.
Maybe we need a simplified test to validate this

@orhun
Copy link
Sponsor Member

orhun commented May 18, 2024

Is this still an issue?

@orhun orhun added the bug Something isn't working label May 18, 2024
@joshka
Copy link
Member Author

joshka commented May 19, 2024

This is mostly a prompt to check whether this is a bug at some point. I haven't looked into it more than superficially.

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

3 participants