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
LocalSet drop impl panics when dropped with unfinished futures #1842
Labels
C-bug
Category: This is a bug.
Comments
Thanks for the report! I'll take a look at fixing that. |
hawkw
added a commit
that referenced
this issue
Nov 27, 2019
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
hawkw
added a commit
that referenced
this issue
Nov 27, 2019
it turns out that the `Scheduler::release` method on `LocalSet`'s `Scheduler` *is* called, when the `Scheduler` is dropped with tasks still running. Currently, that method is `unreachable!`, which means that dropping a `LocalSet` with tasks running will panic. This commit fixes the panic, by pushing released tasks to `pending_drop`. This is the same as `BasicScheduler`. Fixes #1842 Signed-off-by: Eliza Weisman <eliza@buoyant.io>
PR #1843 should fix this. Thanks again for reporting! |
carllerche
pushed a commit
that referenced
this issue
Nov 27, 2019
It turns out that the `Scheduler::release` method on `LocalSet`'s `Scheduler` *is* called, when the `Scheduler` is dropped with tasks still running. Currently, that method is `unreachable!`, which means that dropping a `LocalSet` with tasks running will panic. This commit fixes the panic, by pushing released tasks to `pending_drop`. This is the same as `BasicScheduler`. Fixes #1842
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
Platform
Description
The drop impl for
tokio::task::LocalSet
panics withwhen it is dropped while it still contains an incomplete future. Instead, I would expect this to just drop all the incomplete futures and continue normally.
The following code triggers this issue
Cargo.toml
Stack Trace
The text was updated successfully, but these errors were encountered: