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

rt(threaded): move inject queue lock to worker #5754

Merged
merged 4 commits into from
Jun 2, 2023

Conversation

carllerche
Copy link
Member

This commit is a step towards the ongoing effort to unify the mutex in the multi-threaded scheduler. The Inject queue is split into two structs. Shared holds fields that are concurrently accessed, and Synced holds fields that must be locked to access. The multi-threaded scheduler is responsible for locking Synced and passing it in when needed.

The commit also splits inject into multiple files to help reduce the amount of code defined in macros.

This commit is a step towards the ongoing effort to unify the mutex in
the multi-threaded scheduler. The Inject queue is split into two
structs. `Shared` holds fields that are concurrently accessed, and
`Synced` holds fields that must be locked to access. The multi-threaded
scheduler is responsible for locking `Synced` and passing it in when
needed.

The commit also splits `inject` into multiple files to help reduce the
amount of code defined in macros.
@carllerche carllerche added C-maintenance Category: PRs that clean code up or issues documenting cleanup. A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime labels Jun 2, 2023
@github-actions github-actions bot added the R-loom Run loom tests on this PR label Jun 2, 2023
@carllerche carllerche merged commit fb4d430 into master Jun 2, 2023
59 checks passed
@carllerche carllerche deleted the rt-extract-inject-lock branch June 2, 2023 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. M-runtime Module: tokio/runtime R-loom Run loom tests on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants