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

Update websocket.rs #104

Closed
wants to merge 3 commits into from
Closed

Update websocket.rs #104

wants to merge 3 commits into from

Conversation

DamienDeepgram
Copy link
Contributor

Resolves potential issue with select_biased and fuse() inside loop

Futures and streams which are not already fused can be fused using the .fuse() method. Note, though, that fusing a future or stream directly in the call to select_biased! will not be enough to prevent it from being polled after completion if the select_biased! call is in a loop, so when select_biased!ing in a loop, users should take care to fuse() outside of the loop.

Ref: https://docs.rs/futures-util/latest/futures_util/macro.select_biased.html#:~:text=call%20is%20in%20a%20loop,every%20branch%20in%20a%20select_biased!

@DamienDeepgram DamienDeepgram deleted the DamienDeepgram-patch-1 branch January 24, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant