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: move Inject to runtime::scheduler #5748

Merged
merged 3 commits into from
Jun 1, 2023
Merged

Conversation

carllerche
Copy link
Member

Previously, Inject was defined in runtime::task. This was because it used some internal fns as part of the intrusive linked-list implementation.

In the future, we want to remove the mutex from Inject and move it to the scheduler proper (to reduce mutex ops). To set this up, this commit moves Inject to runtime::scheduler. To make this work, we have to pub(crate) task::RawTask and use that as the interface to access the next / previous pointers.

Previously, `Inject` was defined in `runtime::task`. This was because it
used some internal fns as part of the intrusive linked-list
implementation.

In the future, we want to remove the mutex from Inject and move it to
the scheduler proper (to reduce mutex ops). To set this up, this commit
moves `Inject` to `runtime::scheduler`. To make this work, we have to
`pub(crate)` `task::RawTask` and use that as the interface to access the
next / previous pointers.
@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 1, 2023
@github-actions github-actions bot added the R-loom Run loom tests on this PR label Jun 1, 2023
@carllerche
Copy link
Member Author

CI is spuriously failing. #5752 attempts to resolve the issue.

@carllerche carllerche merged commit a8b6353 into master Jun 1, 2023
59 checks passed
@carllerche carllerche deleted the rt-move-inject-to-scheduler branch June 1, 2023 21:56
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