-
Notifications
You must be signed in to change notification settings - Fork 46
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
Push task directly to the local queue #62
Comments
notgull
added a commit
that referenced
this issue
Feb 22, 2024
Currently, runner local queues rely on a RwLock<Vec<Arc<ConcurrentQueue>>>> to store the queues instead of using actual thread-local storage. This adds thread_local as a dependency, but this should allow the executor to work steal without needing to hold a lock, as well as allow tasks to schedule onto the local queue directly, where possible, instead of always relying on the global injector queue. Fixes #62 Co-authored-by: John Nunley <[email protected]>
This might need to be reopened due to the revert in 1.10. The main issue stems from tick-only use cases being unable to find tasks. For which there are some potential options for resolving that problem:
Given that try_tick might be removable in the breaking change, the last option there may be the best for performance across all other options. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was originally implemented in #37, but the implementation turned out to be very buggy so I removed it in #61. Still, I think it's an important optimization even for a reference executor, as it nearly doubles our performance in micro-benchmarks.
async-executor/src/lib.rs
Line 257 in 8a0832c
The text was updated successfully, but these errors were encountered: