mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
doc: conversion of doc comments to indicative mood (#4174)
Co-authored-by: Antonello Palazzi <[email protected]>
This commit is contained in:
co-authored by
Antonello Palazzi
parent
095012b03b
commit
03969cdae7
@@ -25,28 +25,28 @@ pub(crate) struct Spawner {
|
||||
}
|
||||
|
||||
struct Inner {
|
||||
/// State shared between worker threads
|
||||
/// State shared between worker threads.
|
||||
shared: Mutex<Shared>,
|
||||
|
||||
/// Pool threads wait on this.
|
||||
condvar: Condvar,
|
||||
|
||||
/// Spawned threads use this name
|
||||
/// Spawned threads use this name.
|
||||
thread_name: ThreadNameFn,
|
||||
|
||||
/// Spawned thread stack size
|
||||
/// Spawned thread stack size.
|
||||
stack_size: Option<usize>,
|
||||
|
||||
/// Call after a thread starts
|
||||
/// Call after a thread starts.
|
||||
after_start: Option<Callback>,
|
||||
|
||||
/// Call before a thread stops
|
||||
/// Call before a thread stops.
|
||||
before_stop: Option<Callback>,
|
||||
|
||||
// Maximum number of threads
|
||||
// Maximum number of threads.
|
||||
thread_cap: usize,
|
||||
|
||||
// Customizable wait timeout
|
||||
// Customizable wait timeout.
|
||||
keep_alive: Duration,
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ struct Shared {
|
||||
/// calling shutdown handles joining on these.
|
||||
worker_threads: HashMap<usize, thread::JoinHandle<()>>,
|
||||
/// This is a counter used to iterate worker_threads in a consistent order (for loom's
|
||||
/// benefit)
|
||||
/// benefit).
|
||||
worker_thread_index: usize,
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ type Task = task::UnownedTask<NoopSchedule>;
|
||||
|
||||
const KEEP_ALIVE: Duration = Duration::from_secs(10);
|
||||
|
||||
/// Run the provided function on an executor dedicated to blocking operations.
|
||||
/// Runs the provided function on an executor dedicated to blocking operations.
|
||||
pub(crate) fn spawn_blocking<F, R>(func: F) -> JoinHandle<R>
|
||||
where
|
||||
F: FnOnce() -> R + Send + 'static,
|
||||
|
||||
Reference in New Issue
Block a user