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: Shared must relinquish control to the executor if repolled #2136

Merged
merged 1 commit into from
May 6, 2020

Conversation

Marwes
Copy link
Contributor

@Marwes Marwes commented Apr 24, 2020

If the wrapped future requires that another future runs before it stops
waking itself while returning pending the current Shared will loop
forever. This removes the REPOLL case and returns pending immediately,
since the current task is recorded and therefore woken through
Notifier's wake_by_ref the Shared future will still be polled
again

Fixes #2130

If the wrapped future requires that another future runs before it stops
waking itself while returning pending the current Shared will loop
forever. This removes the `REPOLL` case and returns pending immediately,
since the current task is recorded and therefore woken through
`Notifier`'s `wake_by_ref` the `Shared` future will still be polled
again

Fixes rust-lang#2130
@cramertj cramertj merged commit 32005e3 into rust-lang:master May 6, 2020
@Marwes Marwes deleted the shared_no_repoll branch May 6, 2020 21:42
krallin added a commit to krallin/futures-rs that referenced this pull request May 13, 2020
…polled

This backports rust-lang#2136 to Futures 0.1. There isn't much to add on top of
what's mentioned in rust-lang#2136: the same bug exists in Futures 0.1, and it'll
fail in the same way when polled in recent versions of Tokio (rust-lang#2418).

Backporting to 0.1 allows codebases that still have some Futures 0.1
code around to still use newer versions of Tokio.
krallin added a commit to krallin/futures-rs that referenced this pull request May 13, 2020
…polled

This backports rust-lang#2136 to Futures 0.1. There isn't much to add on top of
what's mentioned in rust-lang#2136: the same bug exists in Futures 0.1, and it'll
fail in the same way when polled in recent versions of Tokio (rust-lang#2418).

Backporting to 0.1 allows codebases that still have some Futures 0.1
code around to still use newer versions of Tokio.
krallin added a commit to krallin/futures-rs that referenced this pull request May 23, 2020
…polled

This backports rust-lang#2136 to Futures 0.1. There isn't much to add on top of
what's mentioned in rust-lang#2136: the same bug exists in Futures 0.1, and it'll
fail in the same way when polled in recent versions of Tokio (rust-lang#2418).

Backporting to 0.1 allows codebases that still have some Futures 0.1
code around to still use newer versions of Tokio.
taiki-e pushed a commit that referenced this pull request Sep 5, 2020
…polled

This backports #2136 to Futures 0.1. There isn't much to add on top of
what's mentioned in #2136: the same bug exists in Futures 0.1, and it'll
fail in the same way when polled in recent versions of Tokio (#2418).

Backporting to 0.1 allows codebases that still have some Futures 0.1
code around to still use newer versions of Tokio.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shared combinator can block the executor
3 participants