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

Fix Subscription cancelation when never awaiting #1349

Merged
merged 1 commit into from
May 30, 2022

Conversation

hecrj
Copy link
Member

@hecrj hecrj commented May 27, 2022

StreamExt::forward will keep polling a ready Stream in a loop. If the Stream is always ready, the poll method of Forward effectively blocks (see rust-lang/futures-rs#2552).

The fix consists in manually implementing a simpler version of Forward.

Fixes #1348.

@hecrj hecrj added bug Something isn't working shell labels May 27, 2022
@hecrj hecrj added this to the 0.4.3 milestone May 27, 2022
`StreamExt::forward` will keep polling a ready `Stream` in a loop. If the
`Stream` is always ready, the `poll` method of `Forward` effectively
blocks (see rust-lang/futures-rs#2552).

The fix consists in manually implementing a simpler version of `Forward`.
@hecrj hecrj force-pushed the fix/subscription-cancelation branch from ad69ddd to ecd00cf Compare May 27, 2022 17:55
@hecrj hecrj merged commit d26b3f0 into master May 30, 2022
@hecrj hecrj deleted the fix/subscription-cancelation branch May 30, 2022 21:57
hecrj added a commit that referenced this pull request May 31, 2022
Fix `Subscription` cancelation when never awaiting
@hecrj hecrj modified the milestones: 0.4.3, 0.5.0 Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A running subscription without a yield never gets killed if using iced_native::subscription::unfold.
1 participant