rt: rm internal Park,Unpark traits (#4991)

Years ago, Tokio was organized as a cluster of separate crates. This
architecture required a trait to represent "park the thread and do
work.". When all crates were combined into a single crate, the `Park`
and `Unpark` traits remained as internal details.

This patch removes these traits as they are no longer needed. This is in
service of a future refactor that will decouple the various resource
drivers and store them in a single struct instead of nesting them.
However, in the mean time, removing the Park/Unpark traits adds a bit of
messy code to make the conditional compilation work. This code will
(hopefully) be short-lived.
This commit is contained in:
Carl Lerche
2022-09-07 18:39:45 -07:00
committed by GitHub
parent 2ad347465e
commit 99aa8d12b7
17 changed files with 348 additions and 468 deletions
+2
View File
@@ -281,6 +281,8 @@ jobs:
run: cargo install cargo-hack
- name: check --each-feature
run: cargo hack check --all --each-feature -Z avoid-dev-deps
- name: check net,time
run: cargo check -p tokio --no-default-features --features net,time -Z avoid-dev-deps
# Try with unstable feature flags
- name: check --each-feature --unstable
run: cargo hack check --all --each-feature -Z avoid-dev-deps