mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
chore: move doc comments inside macro invocations (#901)
This commit is contained in:
parent
dd66096ea0
commit
2d5aa82341
@ -194,17 +194,21 @@ struct CurrentRunner {
|
||||
id: Cell<Option<u64>>,
|
||||
}
|
||||
|
||||
/// Current thread's task runner. This is set in `TaskRunner::with`
|
||||
thread_local!(static CURRENT: CurrentRunner = CurrentRunner {
|
||||
spawn: Cell::new(None),
|
||||
id: Cell::new(None),
|
||||
});
|
||||
thread_local!{
|
||||
/// Current thread's task runner. This is set in `TaskRunner::with`
|
||||
static CURRENT: CurrentRunner = CurrentRunner {
|
||||
spawn: Cell::new(None),
|
||||
id: Cell::new(None),
|
||||
}
|
||||
}
|
||||
|
||||
/// Unique ID to assign to each new executor launched on this thread.
|
||||
///
|
||||
/// The unique ID is used to determine if the currently running executor matches the one referred
|
||||
/// to by a `Handle` so that direct task dispatch can be used.
|
||||
thread_local!(static EXECUTOR_ID: Cell<u64> = Cell::new(0));
|
||||
thread_local!{
|
||||
/// Unique ID to assign to each new executor launched on this thread.
|
||||
///
|
||||
/// The unique ID is used to determine if the currently running executor matches the one
|
||||
/// referred to by a `Handle` so that direct task dispatch can be used.
|
||||
static EXECUTOR_ID: Cell<u64> = Cell::new(0)
|
||||
}
|
||||
|
||||
/// Run the executor bootstrapping the execution with the provided future.
|
||||
///
|
||||
|
@ -64,8 +64,10 @@ enum State {
|
||||
Active
|
||||
}
|
||||
|
||||
/// Thread-local tracking the current executor
|
||||
thread_local!(static EXECUTOR: Cell<State> = Cell::new(State::Empty));
|
||||
thread_local!{
|
||||
/// Thread-local tracking the current executor
|
||||
static EXECUTOR: Cell<State> = Cell::new(State::Empty)
|
||||
}
|
||||
|
||||
// ===== impl DefaultExecutor =====
|
||||
|
||||
|
@ -167,8 +167,10 @@ pub(crate) enum Direction {
|
||||
/// The global fallback reactor.
|
||||
static HANDLE_FALLBACK: AtomicUsize = AtomicUsize::new(0);
|
||||
|
||||
/// Tracks the reactor for the current execution context.
|
||||
thread_local!(static CURRENT_REACTOR: RefCell<Option<HandlePriv>> = RefCell::new(None));
|
||||
thread_local!{
|
||||
/// Tracks the reactor for the current execution context.
|
||||
static CURRENT_REACTOR: RefCell<Option<HandlePriv>> = RefCell::new(None)
|
||||
}
|
||||
|
||||
const TOKEN_SHIFT: usize = 22;
|
||||
|
||||
|
@ -20,8 +20,10 @@ pub struct Clock {
|
||||
now: Option<Arc<Now>>,
|
||||
}
|
||||
|
||||
/// Thread-local tracking the current clock
|
||||
thread_local!(static CLOCK: Cell<Option<*const Clock>> = Cell::new(None));
|
||||
thread_local!{
|
||||
/// Thread-local tracking the current clock
|
||||
static CLOCK: Cell<Option<*const Clock>> = Cell::new(None)
|
||||
}
|
||||
|
||||
/// Returns an `Instant` corresponding to "now".
|
||||
///
|
||||
|
@ -44,8 +44,10 @@ pub(crate) struct HandlePriv {
|
||||
inner: Weak<Inner>,
|
||||
}
|
||||
|
||||
/// Tracks the timer for the current execution context.
|
||||
thread_local!(static CURRENT_TIMER: RefCell<Option<HandlePriv>> = RefCell::new(None));
|
||||
thread_local!{
|
||||
/// Tracks the timer for the current execution context.
|
||||
static CURRENT_TIMER: RefCell<Option<HandlePriv>> = RefCell::new(None)
|
||||
}
|
||||
|
||||
/// Set the default timer for the duration of the closure.
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user