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
Add spawn_pinned to tokio-util #3370
Merged
Merged
Commits on Jan 3, 2021
-
-
tokio-util: add (incomplete) spawn_pinned support
The pinned workers don't shut down when the tokio runtime does, so the included test never completes. The worker count is currently hard-coded with a fixme. PinnedPool does not reset, so if a second runtime is started after the first finishes, spawn_pinned will not work (the first issue about not shutting down the workers prevents this scenario from happening atm).
-
-
Commits on Jan 4, 2021
Commits on Jan 5, 2021
Commits on Sep 28, 2021
Commits on Oct 24, 2021
Commits on Oct 29, 2021
Commits on Oct 30, 2021
Commits on Nov 21, 2021
Commits on Nov 25, 2021
-
-
Make spawn_pinned synchronous again, but immediately send the task
This also makes spawn_pinned_blocking pretty redundant, so it is removed.
-
Commits on Nov 26, 2021
-
Synchronously return join handle in spawn_pinned
Also added more error handling and comments. There are still two more error handling issues: 1. `create_task` could panic, which kills the worker. Using `catch_unwind` limits the types you can use for `create_task` too much. We could use AssertUnwindSafe here, but probably shouldn't. 2. If a worker dies for some reason, the pool doesn't heal (recreate the worker). Healing the pool would require more mutable state and mutual exclusion, which might get complicated.
-
Commits on Dec 3, 2021
Commits on Dec 4, 2021
Commits on Dec 5, 2021
Commits on Dec 21, 2021
Commits on Dec 28, 2021
Commits on Dec 29, 2021
-
-
-
-
Update tokio-util/src/task/spawn_pinned.rs
Co-authored-by: Alice Ryhl <aliceryhl@google.com>
-
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.