Skip to content

Commit 02b3d4d

Browse files
committed
Move CancellationToken into sync module
1 parent e2f303b commit 02b3d4d

File tree

8 files changed

+7
-36
lines changed

8 files changed

+7
-36
lines changed

tokio/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,6 @@ pub mod runtime;
368368

369369
pub(crate) mod coop;
370370

371-
cfg_scope! {
372-
pub mod scope;
373-
}
374-
375371
cfg_signal! {
376372
pub mod signal;
377373
}

tokio/src/macros/cfg.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,6 @@ macro_rules! cfg_process {
187187
}
188188
}
189189

190-
macro_rules! cfg_scope {
191-
($($item:item)*) => {
192-
$(
193-
#[cfg(feature = "scope")]
194-
#[cfg_attr(docsrs, doc(cfg(feature = "scope")))]
195-
$item
196-
)*
197-
}
198-
}
199-
200190
macro_rules! cfg_signal {
201191
($($item:item)*) => {
202192
$(

tokio/src/scope/mod.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.

tokio/src/scope/tests/mod.rs

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

tokio/src/sync/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,11 @@ cfg_sync! {
425425

426426
pub mod broadcast;
427427

428+
#[cfg(tokio_unstable)]
429+
mod cancellation_token;
430+
#[cfg(tokio_unstable)]
431+
pub use cancellation_token::{CancellationToken, WaitForCancellationFuture};
432+
428433
pub mod mpsc;
429434

430435
mod mutex;

tokio/src/sync/tests/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ cfg_not_loom! {
77
cfg_loom! {
88
mod loom_atomic_waker;
99
mod loom_broadcast;
10+
#[cfg(tokio_unstable)]
11+
mod loom_cancellation_token;
1012
mod loom_list;
1113
mod loom_mpsc;
1214
mod loom_notify;

0 commit comments

Comments
 (0)