-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
task: fix infinite loop when dropping a LocalSet
#1892
Commits on Dec 3, 2019
-
task: add test reproducing issue #1885
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for abd28ac - Browse repository at this point
Copy the full SHA abd28acView commit details -
task: clear LocalSet's remote queue on drop
Fixes #1885 Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 4f46ac6 - Browse repository at this point
Copy the full SHA 4f46ac6View commit details -
task: reduce duplication between basic_scheduler and LocalSet
This commit factors out the common task queue logic in the basic scheduler runtime and the `LocalSet` struct in `tokio::task`. This is because as more work was done on the `LocalSet`, it has gotten closer and closer to the basic scheduler in behavior, and factoring out the shared code reduces the risk of errors caused by `LocalSet` not doing something that the basic scheduler does. In particular, I noticed the basic scheduler has a flag that indicates the remote queue has been closed, which is set when dropping the scheduler. This prevents tasks from being added after the scheduler has started shutting down, stopping a potential task leak. Rather than duplicating this code in `LocalSet`, I thought it was probably better to factor it out into a shared type. There are a few cases where there are small differences in behavior, though, so there is still a need for separate types implemented _using_ the new `Queues` struct. However, it should cover most of the identical code. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 90b5b1f - Browse repository at this point
Copy the full SHA 90b5b1fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d78ba6 - Browse repository at this point
Copy the full SHA 7d78ba6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03357f1 - Browse repository at this point
Copy the full SHA 03357f1View commit details
Commits on Dec 4, 2019
-
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for a01f596 - Browse repository at this point
Copy the full SHA a01f596View commit details -
move Queues to its own mod, rename to SingleThreadQueues
this should hopefully make it clearer that these are not used by the threadpool. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for fa878c6 - Browse repository at this point
Copy the full SHA fa878c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 16895d5 - Browse repository at this point
Copy the full SHA 16895d5View commit details -
rename again (thanks @jonhoo!)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 6fd52ea - Browse repository at this point
Copy the full SHA 6fd52eaView commit details -
basic scheduler no longer needs to be pub(crate)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for c605225 - Browse repository at this point
Copy the full SHA c605225View commit details