id stringlengths 22 133 | text stringlengths 40 40.2k | arch stringclasses 1
value | syntax stringclasses 1
value | kind stringclasses 4
values | repo stringclasses 27
values | path stringlengths 5 116 | license stringclasses 6
values | commit stringlengths 40 40 | source_host stringclasses 1
value | category stringclasses 16
values | source_url stringlengths 85 196 | line_start int64 1 4.28k | line_end int64 4 4.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tokio-rs/tokio:tokio/src/runtime/mod.rs:17 | /// Boundary value to prevent stack overflow caused by a large-sized
/// Future being placed in the stack.
pub(crate) const BOX_FUTURE_THRESHOLD: usize = if cfg!(debug_assertions) {
2048
} else {
16384
};
mod thread_id;
pub(crate) use thread_id::ThreadId;
pub(crate) mod me... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/runtime/mod.rs | 641 | 668 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:10 | //! slot instead of being added to a queue. If there was already a task in the
//! lifo slot when this happened, then the lifo slot is replaced, and the task
//! that used to be in the lifo slot is placed in the thread's local queue.
//! When the runtime finishes scheduling a task, it will schedule the task in
//! the ... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | eeb55c733ba9a83c51d08b1629dca6a5ec0f4b2b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/eeb55c733ba9a83c51d08b1629dca6a5ec0f4b2b/tokio/src/runtime/mod.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:14 | #[cfg(all(tokio_unstable, feature = "rt-multi-thread"))]
pub(crate) fn scheduler_handle(&self) -> &crate::runtime::scheduler::Handle {
match self {
Timer::Traditional(_) => unreachable!("we should not call this on Traditional Timer"),
#[cfg(all(tokio_unstable, feature... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | a8435c0fc8612bbdf38d3ad8b2ba96d5dbc848d9 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a8435c0fc8612bbdf38d3ad8b2ba96d5dbc848d9/tokio/src/runtime/mod.rs | 521 | 580 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:15 | #[cfg_attr(target_os = "wasi", allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use blocking::Mandatory;
}
cfg_fs! {
pub(crate) use blocking::spawn_mandatory_blocking;
}
mod builder;
pub use self::builder::Builder;
cfg_unstable! ... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | a8435c0fc8612bbdf38d3ad8b2ba96d5dbc848d9 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a8435c0fc8612bbdf38d3ad8b2ba96d5dbc848d9/tokio/src/runtime/mod.rs | 561 | 620 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:16 | ///
/// ```
/// # #[cfg(not(target_family = "wasm"))]
/// # {
/// #[tokio::main(flavor = "multi_thread", worker_threads = 4)]
/// async fn main() {
/// let index = tokio::spawn(async {
/// tokio::runtime::worker_index()
/// }).await.unwrap(... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | a8435c0fc8612bbdf38d3ad8b2ba96d5dbc848d9 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a8435c0fc8612bbdf38d3ad8b2ba96d5dbc848d9/tokio/src/runtime/mod.rs | 601 | 660 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:10 | //! slot instead of being added to a queue. If there was already a task in the
//! lifo slot when this happened, then the lifo slot is replaced, and the task
//! that used to be in the lifo slot is placed in the thread's local queue.
//! When the runtime finishes scheduling a task, it will schedule the task in
//! the ... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 26de3187e759e06c25432413643ea57d8a79503c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/26de3187e759e06c25432413643ea57d8a79503c/tokio/src/runtime/mod.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:11 | pub(crate) mod scheduler;
cfg_io_driver_impl! {
pub(crate) mod io;
}
cfg_process_driver! {
mod process;
}
#[cfg_attr(not(feature = "time"), allow(dead_code))]
#[derive(Debug, Copy, Clone, PartialEq)]
pub(crate) enum TimerFlavor {
Traditional,
#[cfg(all(tokio_unstable, feature = "rt-multi-thread"))]
... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 26de3187e759e06c25432413643ea57d8a79503c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/26de3187e759e06c25432413643ea57d8a79503c/tokio/src/runtime/mod.rs | 401 | 460 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:12 | ) -> Self {
match handle.timer_flavor() {
crate::runtime::TimerFlavor::Traditional => {
Timer::Traditional(time::TimerEntry::new(handle, deadline))
}
#[cfg(all(tokio_unstable, feature = "rt-multi-thread"))]
crate::runtime::T... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 26de3187e759e06c25432413643ea57d8a79503c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/26de3187e759e06c25432413643ea57d8a79503c/tokio/src/runtime/mod.rs | 441 | 500 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:13 | ) {
// Safety: we never move the inner entries.
let this = unsafe { self.get_unchecked_mut() };
match this {
Timer::Traditional(entry) => {
// Safety: we never move the inner entries.
unsafe { Pin::new_unchecked(entry).reset(new... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 26de3187e759e06c25432413643ea57d8a79503c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/26de3187e759e06c25432413643ea57d8a79503c/tokio/src/runtime/mod.rs | 481 | 540 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:14 | #[cfg(all(tokio_unstable, feature = "tracing"))]
pub(crate) fn driver(self: Pin<&Self>) -> &crate::runtime::time::Handle {
match self.get_ref() {
Timer::Traditional(entry) => entry.driver(),
#[cfg(all(tokio_unstable, feature = "rt-multi-thread"))]
Time... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 26de3187e759e06c25432413643ea57d8a79503c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/26de3187e759e06c25432413643ea57d8a79503c/tokio/src/runtime/mod.rs | 521 | 580 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:15 | pub(crate) use blocking::spawn_mandatory_blocking;
}
mod builder;
pub use self::builder::Builder;
cfg_unstable! {
pub use self::builder::UnhandledPanic;
pub use crate::util::rand::RngSeed;
mod local_runtime;
pub use local_runtime::{LocalRuntime, LocalOptions};
... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 26de3187e759e06c25432413643ea57d8a79503c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/26de3187e759e06c25432413643ea57d8a79503c/tokio/src/runtime/mod.rs | 561 | 620 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:16 | /// }).await.unwrap();
/// println!("Task ran on worker {:?}", index);
/// }
/// # }
/// ```
pub fn worker_index() -> Option<usize> {
context::worker_index()
}
}
cfg_taskdump! {
pub mod dump;
pub use dump::Dump;
}
mod ... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 26de3187e759e06c25432413643ea57d8a79503c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/26de3187e759e06c25432413643ea57d8a79503c/tokio/src/runtime/mod.rs | 601 | 660 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:17 | mod thread_id;
pub(crate) use thread_id::ThreadId;
pub(crate) mod metrics;
pub use metrics::RuntimeMetrics;
cfg_unstable_metrics! {
pub use metrics::{HistogramScale, HistogramConfiguration, LogHistogram, LogHistogramBuilder, InvalidHistogramConfiguration} ;
cfg_net! {
pub(... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 26de3187e759e06c25432413643ea57d8a79503c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/26de3187e759e06c25432413643ea57d8a79503c/tokio/src/runtime/mod.rs | 641 | 660 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:14 | #[cfg(all(tokio_unstable, feature = "tracing"))]
pub(crate) fn driver(self: Pin<&Self>) -> &crate::runtime::time::Handle {
match self.get_ref() {
Timer::Traditional(entry) => entry.driver(),
#[cfg(all(tokio_unstable, feature = "rt-multi-thread"))]
Time... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c0943f99f091bbcc57a93c4533de2e75a9227f90 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c0943f99f091bbcc57a93c4533de2e75a9227f90/tokio/src/runtime/mod.rs | 521 | 580 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:15 | pub(crate) use blocking::spawn_mandatory_blocking;
}
mod builder;
pub use self::builder::Builder;
cfg_unstable! {
pub use self::builder::UnhandledPanic;
pub use crate::util::rand::RngSeed;
mod local_runtime;
pub use local_runtime::{LocalRuntime, LocalOptions};
}
... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c0943f99f091bbcc57a93c4533de2e75a9227f90 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c0943f99f091bbcc57a93c4533de2e75a9227f90/tokio/src/runtime/mod.rs | 561 | 620 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:16 | } else {
16384
};
mod thread_id;
pub(crate) use thread_id::ThreadId;
pub(crate) mod metrics;
pub use metrics::RuntimeMetrics;
cfg_unstable_metrics! {
pub use metrics::{HistogramScale, HistogramConfiguration, LogHistogram, LogHistogramBuilder, InvalidHistogramConfiguration} ;
... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c0943f99f091bbcc57a93c4533de2e75a9227f90 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c0943f99f091bbcc57a93c4533de2e75a9227f90/tokio/src/runtime/mod.rs | 601 | 623 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:10 | //! [current thread runtime]: crate::runtime::Builder::new_current_thread
//! [multi thread runtime]: crate::runtime::Builder::new_multi_thread
//! [`global_queue_interval`]: crate::runtime::Builder::global_queue_interval
//! [`event_interval`]: crate::runtime::Builder::event_interval
//! [`disable_lifo_slot`]: crate::... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d65165f7b563d75db110f8ca26b5a4ae749c59e7 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d65165f7b563d75db110f8ca26b5a4ae749c59e7/tokio/src/runtime/mod.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:11 | pub(crate) mod time;
#[cfg(all(tokio_unstable, feature = "rt-multi-thread"))]
pub(crate) mod time_alt;
use std::task::{Context, Poll};
use std::pin::Pin;
#[derive(Debug)]
pub(crate) enum Timer {
Traditional(time::TimerEntry),
#[cfg(all(tokio_unstable, feature = "rt-multi-thre... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d65165f7b563d75db110f8ca26b5a4ae749c59e7 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d65165f7b563d75db110f8ca26b5a4ae749c59e7/tokio/src/runtime/mod.rs | 401 | 460 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:12 | pub(crate) fn is_elapsed(&self) -> bool {
match self {
Timer::Traditional(entry) => entry.is_elapsed(),
#[cfg(all(tokio_unstable, feature = "rt-multi-thread"))]
Timer::Alternative(entry) => entry.is_elapsed(),
}
}
pub(crate) fn fla... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d65165f7b563d75db110f8ca26b5a4ae749c59e7 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d65165f7b563d75db110f8ca26b5a4ae749c59e7/tokio/src/runtime/mod.rs | 441 | 500 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:13 | match this {
Timer::Traditional(entry) => {
// Safety: we never move the inner entries.
unsafe { Pin::new_unchecked(entry).poll_elapsed(cx) }
}
#[cfg(all(tokio_unstable, feature = "rt-multi-thread"))]
Timer::Alternat... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d65165f7b563d75db110f8ca26b5a4ae749c59e7 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d65165f7b563d75db110f8ca26b5a4ae749c59e7/tokio/src/runtime/mod.rs | 481 | 540 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:14 | }
cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(target_os = "wasi", allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use blocking::Manda... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d65165f7b563d75db110f8ca26b5a4ae749c59e7 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d65165f7b563d75db110f8ca26b5a4ae749c59e7/tokio/src/runtime/mod.rs | 521 | 580 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:15 | pub(crate) use task_hooks::{TaskHooks, TaskCallback};
cfg_unstable! {
pub use task_hooks::TaskMeta;
}
#[cfg(not(tokio_unstable))]
pub(crate) use task_hooks::TaskMeta;
mod handle;
pub use handle::{EnterGuard, Handle, TryCurrentError};
mod runtime;
pub use runtime::{Runtime, Runt... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d65165f7b563d75db110f8ca26b5a4ae749c59e7 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d65165f7b563d75db110f8ca26b5a4ae749c59e7/tokio/src/runtime/mod.rs | 561 | 604 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:14 | }
cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(target_os = "wasi", allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use blocking::Manda... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 0fa7755e97b2b4ba4630d21a6d5316f39aaa4ee5 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0fa7755e97b2b4ba4630d21a6d5316f39aaa4ee5/tokio/src/runtime/mod.rs | 521 | 580 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:15 | pub(crate) use task_hooks::{TaskHooks, TaskCallback};
cfg_unstable! {
pub use task_hooks::TaskMeta;
}
#[cfg(not(tokio_unstable))]
pub(crate) use task_hooks::TaskMeta;
mod handle;
pub use handle::{EnterGuard, Handle, TryCurrentError};
mod runtime;
pub use runtime::{Runtime, Runt... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 0fa7755e97b2b4ba4630d21a6d5316f39aaa4ee5 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0fa7755e97b2b4ba4630d21a6d5316f39aaa4ee5/tokio/src/runtime/mod.rs | 561 | 604 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:14 | }
cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(target_os = "wasi", allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use blocking::Manda... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 73d733a3415af98d72c2cce40612c4e59adbd5d8 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/73d733a3415af98d72c2cce40612c4e59adbd5d8/tokio/src/runtime/mod.rs | 521 | 580 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:15 | pub use dump::Dump;
}
mod task_hooks;
pub(crate) use task_hooks::{TaskHooks, TaskCallback};
cfg_unstable! {
pub use task_hooks::TaskMeta;
}
#[cfg(not(tokio_unstable))]
pub(crate) use task_hooks::TaskMeta;
mod handle;
pub use handle::{EnterGuard, Handle, TryCurrentError};
... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 73d733a3415af98d72c2cce40612c4e59adbd5d8 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/73d733a3415af98d72c2cce40612c4e59adbd5d8/tokio/src/runtime/mod.rs | 561 | 604 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:5 | //! terminated, but in the presence of unstoppable spawned work are not
//! guaranteed to have been terminated. See the
//! [struct level documentation](Runtime#shutdown) for more details.
//!
//! [tasks]: crate::task
//! [`Runtime`]: Runtime
//! [`tokio::spawn`]: crate::spawn
//! [`tokio::main`]: ../attr.main.html
//!... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c445e467ce4363b3a9b6825268814a9bc27c0127 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c445e467ce4363b3a9b6825268814a9bc27c0127/tokio/src/runtime/mod.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | pub(crate) mod time;
}
cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(target_os = "wasi", allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c445e467ce4363b3a9b6825268814a9bc27c0127 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c445e467ce4363b3a9b6825268814a9bc27c0127/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | mod handle;
pub use handle::{EnterGuard, Handle, TryCurrentError};
mod runtime;
pub use runtime::{Runtime, RuntimeFlavor};
mod thread_id;
pub(crate) use thread_id::ThreadId;
cfg_metrics! {
mod metrics;
pub use metrics::{RuntimeMetrics, HistogramScale};
pub(crate) use ... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c445e467ce4363b3a9b6825268814a9bc27c0127 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c445e467ce4363b3a9b6825268814a9bc27c0127/tokio/src/runtime/mod.rs | 241 | 269 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:5 | //! terminated, but in the presence of unstoppable spawned work are not
//! guaranteed to have been terminated. See the
//! [struct level documentation](Runtime#shutdown) for more details.
//!
//! [tasks]: crate::task
//! [`Runtime`]: Runtime
//! [`tokio::spawn`]: crate::spawn
//! [`tokio::main`]: ../attr.main.html
//!... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 63577cd8d3f2b1a1c787870125ab808eaa1eaa99 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/63577cd8d3f2b1a1c787870125ab808eaa1eaa99/tokio/src/runtime/mod.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | pub(crate) mod time;
}
cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use bl... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 63577cd8d3f2b1a1c787870125ab808eaa1eaa99 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/63577cd8d3f2b1a1c787870125ab808eaa1eaa99/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | pub(crate) mod time;
}
cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use bl... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c748f4965eae883a2291945116d84cab5d657100 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c748f4965eae883a2291945116d84cab5d657100/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | mod runtime;
pub use runtime::{Runtime, RuntimeFlavor};
mod thread_id;
pub(crate) use thread_id::ThreadId;
cfg_metrics! {
mod metrics;
pub use metrics::{RuntimeMetrics, HistogramScale};
pub(crate) use metrics::{MetricsBatch, SchedulerMetrics, WorkerMetrics, HistogramBuilder};
... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c748f4965eae883a2291945116d84cab5d657100 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c748f4965eae883a2291945116d84cab5d657100/tokio/src/runtime/mod.rs | 241 | 265 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | pub(crate) mod time;
}
cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use bl... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c84d0a14b189c45da8f5e963fd3a83790ec92f8e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c84d0a14b189c45da8f5e963fd3a83790ec92f8e/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | pub(crate) mod time;
}
cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use bl... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f | github | async-runtime | https://github.com/tokio-rs/tokio/blob/660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | mod handle;
pub use handle::{EnterGuard, Handle, TryCurrentError};
mod runtime;
pub use runtime::{Runtime, RuntimeFlavor};
mod thread_id;
pub(crate) use thread_id::ThreadId;
cfg_metrics! {
mod metrics;
pub use metrics::RuntimeMetrics;
pub(crate) use metrics::{MetricsB... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f | github | async-runtime | https://github.com/tokio-rs/tokio/blob/660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f/tokio/src/runtime/mod.rs | 241 | 268 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | pub(crate) mod time;
}
cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use bl... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 061325ba7ea952c78b23abe685e40a3aac132a2b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/061325ba7ea952c78b23abe685e40a3aac132a2b/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | mod thread_id;
pub(crate) use thread_id::ThreadId;
cfg_metrics! {
mod metrics;
pub use metrics::RuntimeMetrics;
pub(crate) use metrics::{MetricsBatch, SchedulerMetrics, WorkerMetrics};
cfg_net! {
pub(crate) use metrics::IoDriverMetrics;
}
}
cfg_not_met... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 061325ba7ea952c78b23abe685e40a3aac132a2b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/061325ba7ea952c78b23abe685e40a3aac132a2b/tokio/src/runtime/mod.rs | 241 | 263 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:5 | //! Any tasks that have not yet completed will be dropped.
//!
//! [tasks]: crate::task
//! [`Runtime`]: Runtime
//! [`tokio::spawn`]: crate::spawn
//! [`tokio::main`]: ../attr.main.html
//! [runtime builder]: crate::runtime::Builder
//! [`Runtime::new`]: crate::runtime::Runtime::new
//! [`Builder::threaded_scheduler`]... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c6552c5680fa14105547cfbbc26b26d67197b64e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6552c5680fa14105547cfbbc26b26d67197b64e/tokio/src/runtime/mod.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use blocking::Mandatory;
}... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c6552c5680fa14105547cfbbc26b26d67197b64e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6552c5680fa14105547cfbbc26b26d67197b64e/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | pub(crate) use thread_id::ThreadId;
cfg_metrics! {
mod metrics;
pub use metrics::RuntimeMetrics;
pub(crate) use metrics::{MetricsBatch, SchedulerMetrics, WorkerMetrics};
cfg_net! {
pub(crate) use metrics::IoDriverMetrics;
}
}
cfg_not_metrics! {
pub... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | c6552c5680fa14105547cfbbc26b26d67197b64e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6552c5680fa14105547cfbbc26b26d67197b64e/tokio/src/runtime/mod.rs | 241 | 261 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use blocking::Mandatory;
}... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 22862739dddd49a94065aa7a917cde2dc8a3f6bc | github | async-runtime | https://github.com/tokio-rs/tokio/blob/22862739dddd49a94065aa7a917cde2dc8a3f6bc/tokio/src/runtime/mod.rs | 201 | 258 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | mod metrics;
pub use metrics::RuntimeMetrics;
pub(crate) use metrics::{MetricsBatch, SchedulerMetrics, WorkerMetrics};
cfg_net! {
pub(crate) use metrics::IoDriverMetrics;
}
}
cfg_not_metrics! {
pub(crate) mod metrics;
pub(crate) use metrics::{SchedulerM... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 22862739dddd49a94065aa7a917cde2dc8a3f6bc | github | async-runtime | https://github.com/tokio-rs/tokio/blob/22862739dddd49a94065aa7a917cde2dc8a3f6bc/tokio/src/runtime/mod.rs | 241 | 258 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use blocking::Mandatory;
}... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 687aa2bae5d6c70bb942238d793d9d2a41e59ac9 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/687aa2bae5d6c70bb942238d793d9d2a41e59ac9/tokio/src/runtime/mod.rs | 201 | 255 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | pub(crate) use metrics::{MetricsBatch, SchedulerMetrics, WorkerMetrics};
cfg_net! {
pub(crate) use metrics::IoDriverMetrics;
}
}
cfg_not_metrics! {
pub(crate) mod metrics;
pub(crate) use metrics::{SchedulerMetrics, WorkerMetrics, MetricsBatch};
}
/// After thre... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 687aa2bae5d6c70bb942238d793d9d2a41e59ac9 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/687aa2bae5d6c70bb942238d793d9d2a41e59ac9/tokio/src/runtime/mod.rs | 241 | 255 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:5 | //! Any tasks that have not yet completed will be dropped.
//!
//! [tasks]: crate::task
//! [`Runtime`]: Runtime
//! [`tokio::spawn`]: crate::spawn
//! [`tokio::main`]: ../attr.main.html
//! [runtime builder]: crate::runtime::Builder
//! [`Runtime::new`]: crate::runtime::Runtime::new
//! [`Builder::threaded_scheduler`]... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 32da1aa9da833f6db59d6a97e2a569b780d9f6b4 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/32da1aa9da833f6db59d6a97e2a569b780d9f6b4/tokio/src/runtime/mod.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod enter;
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 32da1aa9da833f6db59d6a97e2a569b780d9f6b4 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/32da1aa9da833f6db59d6a97e2a569b780d9f6b4/tokio/src/runtime/mod.rs | 201 | 259 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | cfg_metrics! {
mod metrics;
pub use metrics::RuntimeMetrics;
pub(crate) use metrics::{MetricsBatch, SchedulerMetrics, WorkerMetrics};
cfg_net! {
pub(crate) use metrics::IoDriverMetrics;
}
}
cfg_not_metrics! {
pub(crate) mod metrics;
pub(crate) u... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 32da1aa9da833f6db59d6a97e2a569b780d9f6b4 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/32da1aa9da833f6db59d6a97e2a569b780d9f6b4/tokio/src/runtime/mod.rs | 241 | 259 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod enter;
pub(crate) mod task;
mod config;
use config::Config;
mod blocking;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 26791a62bce6287e3a7274a726e690f98a29a34b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/26791a62bce6287e3a7274a726e690f98a29a34b/tokio/src/runtime/mod.rs | 201 | 259 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:5 | //! Any tasks that have not yet completed will be dropped.
//!
//! [tasks]: crate::task
//! [`Runtime`]: Runtime
//! [`tokio::spawn`]: crate::spawn
//! [`tokio::main`]: ../attr.main.html
//! [runtime builder]: crate::runtime::Builder
//! [`Runtime::new`]: crate::runtime::Runtime::new
//! [`Builder::threaded_scheduler`]... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 467adec4e16bdf1b5461e77d87d1d56b4a29f001 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/467adec4e16bdf1b5461e77d87d1d56b4a29f001/tokio/src/runtime/mod.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod enter;
pub(crate) mod task;
use scheduler::CurrentThread;
mod config;
use config::Config;
mod blocking;
use blocking::BlockingPool;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 467adec4e16bdf1b5461e77d87d1d56b4a29f001 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/467adec4e16bdf1b5461e77d87d1d56b4a29f001/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | cfg_metrics! {
mod metrics;
pub use metrics::RuntimeMetrics;
pub(crate) use metrics::{MetricsBatch, SchedulerMetrics, WorkerMetrics};
cfg_net! {
pub(crate) use metrics::IoDriverMetrics;
}
}
cfg_not_metrics! {
pub(crate) mod metrics;
pub(crate) u... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 467adec4e16bdf1b5461e77d87d1d56b4a29f001 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/467adec4e16bdf1b5461e77d87d1d56b4a29f001/tokio/src/runtime/mod.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:8 | /// # Shutdown
///
/// Shutting down the runtime is done by dropping the value. The current
/// thread will block until the shut down operation has completed.
///
/// * Drain any scheduled work queues.
/// * Drop any futures that have not yet completed.
/// * Drop the reactor.
///
//... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 467adec4e16bdf1b5461e77d87d1d56b4a29f001 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/467adec4e16bdf1b5461e77d87d1d56b4a29f001/tokio/src/runtime/mod.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:9 | ///
/// This is the return type for [`Handle::runtime_flavor`](crate::runtime::Handle::runtime_flavor()).
#[derive(Debug, PartialEq, Eq)]
#[non_exhaustive]
pub enum RuntimeFlavor {
/// The flavor that executes all tasks on the current thread.
CurrentThread,
/// The flavor that ex... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 467adec4e16bdf1b5461e77d87d1d56b4a29f001 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/467adec4e16bdf1b5461e77d87d1d56b4a29f001/tokio/src/runtime/mod.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:16 | self.blocking_pool.shutdown(Some(duration));
}
/// Shuts down the runtime, without waiting for any spawned tasks to shutdown.
///
/// This can be useful if you want to drop a runtime from within another runtime.
/// Normally, dropping a runtime will block indefinitely for spawne... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 467adec4e16bdf1b5461e77d87d1d56b4a29f001 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/467adec4e16bdf1b5461e77d87d1d56b4a29f001/tokio/src/runtime/mod.rs | 601 | 660 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:17 | // runtime are dropped inside the runtime's context.
match context::try_set_current(&self.handle.inner) {
Some(guard) => current_thread.set_context_guard(guard),
None => {
// The context thread-local has already been destroy... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 467adec4e16bdf1b5461e77d87d1d56b4a29f001 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/467adec4e16bdf1b5461e77d87d1d56b4a29f001/tokio/src/runtime/mod.rs | 641 | 669 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:5 | //! Any tasks that have not yet completed will be dropped.
//!
//! [tasks]: crate::task
//! [`Runtime`]: Runtime
//! [`tokio::spawn`]: crate::spawn
//! [`tokio::main`]: ../attr.main.html
//! [runtime builder]: crate::runtime::Builder
//! [`Runtime::new`]: crate::runtime::Runtime::new
//! [`Builder::threaded_scheduler`]... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d8ee2055304e4fcd875d5cec4ed27e8070cc0306 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d8ee2055304e4fcd875d5cec4ed27e8070cc0306/tokio/src/runtime/mod.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod enter;
pub(crate) mod task;
use scheduler::CurrentThread;
mod config;
use config::Config;
mod blocking;
use blocking::BlockingPool;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d8ee2055304e4fcd875d5cec4ed27e8070cc0306 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d8ee2055304e4fcd875d5cec4ed27e8070cc0306/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | pub use metrics::RuntimeMetrics;
pub(crate) use metrics::{MetricsBatch, SchedulerMetrics, WorkerMetrics};
cfg_net! {
pub(crate) use metrics::IoDriverMetrics;
}
}
cfg_not_metrics! {
pub(crate) mod metrics;
pub(crate) use metrics::{SchedulerMetrics, WorkerMetrics... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d8ee2055304e4fcd875d5cec4ed27e8070cc0306 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d8ee2055304e4fcd875d5cec4ed27e8070cc0306/tokio/src/runtime/mod.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:8 | /// Shutting down the runtime is done by dropping the value. The current
/// thread will block until the shut down operation has completed.
///
/// * Drain any scheduled work queues.
/// * Drop any futures that have not yet completed.
/// * Drop the reactor.
///
/// Once the reactor has drop... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d8ee2055304e4fcd875d5cec4ed27e8070cc0306 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d8ee2055304e4fcd875d5cec4ed27e8070cc0306/tokio/src/runtime/mod.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:9 | #[derive(Debug, PartialEq, Eq)]
#[non_exhaustive]
pub enum RuntimeFlavor {
/// The flavor that executes all tasks on the current thread.
CurrentThread,
/// The flavor that executes tasks across multiple threads.
MultiThread,
}
/// The runtime scheduler is either a multi-... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d8ee2055304e4fcd875d5cec4ed27e8070cc0306 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d8ee2055304e4fcd875d5cec4ed27e8070cc0306/tokio/src/runtime/mod.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:16 | /// Shuts down the runtime, without waiting for any spawned tasks to shutdown.
///
/// This can be useful if you want to drop a runtime from within another runtime.
/// Normally, dropping a runtime will block indefinitely for spawned blocking tasks
/// to complete, which would normally n... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d8ee2055304e4fcd875d5cec4ed27e8070cc0306 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d8ee2055304e4fcd875d5cec4ed27e8070cc0306/tokio/src/runtime/mod.rs | 601 | 660 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:17 | Some(guard) => current_thread.set_context_guard(guard),
None => {
// The context thread-local has already been destroyed.
//
// We don't set the guard in this case. Calls to tokio::spawn in task
... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | d8ee2055304e4fcd875d5cec4ed27e8070cc0306 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d8ee2055304e4fcd875d5cec4ed27e8070cc0306/tokio/src/runtime/mod.rs | 641 | 667 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:5 | //! Any tasks that have not yet completed will be dropped.
//!
//! [tasks]: crate::task
//! [`Runtime`]: Runtime
//! [`tokio::spawn`]: crate::spawn
//! [`tokio::main`]: ../attr.main.html
//! [runtime builder]: crate::runtime::Builder
//! [`Runtime::new`]: crate::runtime::Runtime::new
//! [`Builder::threaded_scheduler`]... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | a051ed726f3b99b077e8c9ef8ef1df2ab2943213 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a051ed726f3b99b077e8c9ef8ef1df2ab2943213/tokio/src/runtime/mod.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | cfg_signal_internal_and_unix! {
pub(crate) mod signal;
}
cfg_rt! {
pub(crate) mod enter;
pub(crate) mod task;
use scheduler::CurrentThread;
mod config;
use config::Config;
mod blocking;
use blocking::BlockingPool;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | a051ed726f3b99b077e8c9ef8ef1df2ab2943213 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a051ed726f3b99b077e8c9ef8ef1df2ab2943213/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | mod metrics;
pub use metrics::RuntimeMetrics;
pub(crate) use metrics::{MetricsBatch, SchedulerMetrics, WorkerMetrics};
cfg_net! {
pub(crate) use metrics::IoDriverMetrics;
}
}
cfg_not_metrics! {
pub(crate) mod metrics;
pub(crate) use metrics::{SchedulerM... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | a051ed726f3b99b077e8c9ef8ef1df2ab2943213 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a051ed726f3b99b077e8c9ef8ef1df2ab2943213/tokio/src/runtime/mod.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:8 | ///
/// Shutting down the runtime is done by dropping the value. The current
/// thread will block until the shut down operation has completed.
///
/// * Drain any scheduled work queues.
/// * Drop any futures that have not yet completed.
/// * Drop the reactor.
///
/// Once the reactor ... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | a051ed726f3b99b077e8c9ef8ef1df2ab2943213 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a051ed726f3b99b077e8c9ef8ef1df2ab2943213/tokio/src/runtime/mod.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:9 | /// This is the return type for [`Handle::runtime_flavor`](crate::runtime::Handle::runtime_flavor()).
#[derive(Debug, PartialEq, Eq)]
#[non_exhaustive]
pub enum RuntimeFlavor {
/// The flavor that executes all tasks on the current thread.
CurrentThread,
/// The flavor that executes t... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | a051ed726f3b99b077e8c9ef8ef1df2ab2943213 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a051ed726f3b99b077e8c9ef8ef1df2ab2943213/tokio/src/runtime/mod.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:16 | }
/// Shuts down the runtime, without waiting for any spawned tasks to shutdown.
///
/// This can be useful if you want to drop a runtime from within another runtime.
/// Normally, dropping a runtime will block indefinitely for spawned blocking tasks
/// to complete, which would... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | a051ed726f3b99b077e8c9ef8ef1df2ab2943213 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a051ed726f3b99b077e8c9ef8ef1df2ab2943213/tokio/src/runtime/mod.rs | 601 | 660 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:17 | match context::try_set_current(&self.handle.inner) {
Some(guard) => current_thread.set_context_guard(guard),
None => {
// The context thread-local has already been destroyed.
//
// We don'... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | a051ed726f3b99b077e8c9ef8ef1df2ab2943213 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a051ed726f3b99b077e8c9ef8ef1df2ab2943213/tokio/src/runtime/mod.rs | 641 | 668 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:5 | //! Any tasks that have not yet completed will be dropped.
//!
//! [tasks]: crate::task
//! [`Runtime`]: Runtime
//! [`tokio::spawn`]: crate::spawn
//! [`tokio::main`]: ../attr.main.html
//! [runtime builder]: crate::runtime::Builder
//! [`Runtime::new`]: crate::runtime::Runtime::new
//! [`Builder::threaded_scheduler`]... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | b1f40f4356c7f7be0e1959f992608d2058a76deb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b1f40f4356c7f7be0e1959f992608d2058a76deb/tokio/src/runtime/mod.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | }
cfg_rt! {
pub(crate) mod enter;
pub(crate) mod task;
use scheduler::CurrentThread;
mod config;
use config::Config;
mod blocking;
use blocking::BlockingPool;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(cr... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | b1f40f4356c7f7be0e1959f992608d2058a76deb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b1f40f4356c7f7be0e1959f992608d2058a76deb/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | pub(crate) use metrics::{MetricsBatch, SchedulerMetrics, WorkerMetrics};
cfg_net! {
pub(crate) use metrics::IoDriverMetrics;
}
}
cfg_not_metrics! {
pub(crate) mod metrics;
pub(crate) use metrics::{SchedulerMetrics, WorkerMetrics, MetricsBatch};
}
}
cfg_rt_multi_thr... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | b1f40f4356c7f7be0e1959f992608d2058a76deb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b1f40f4356c7f7be0e1959f992608d2058a76deb/tokio/src/runtime/mod.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:8 | /// thread will block until the shut down operation has completed.
///
/// * Drain any scheduled work queues.
/// * Drop any futures that have not yet completed.
/// * Drop the reactor.
///
/// Once the reactor has dropped, any outstanding I/O resources bound to
/// that reactor will no long... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | b1f40f4356c7f7be0e1959f992608d2058a76deb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b1f40f4356c7f7be0e1959f992608d2058a76deb/tokio/src/runtime/mod.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:9 | #[non_exhaustive]
pub enum RuntimeFlavor {
/// The flavor that executes all tasks on the current thread.
CurrentThread,
/// The flavor that executes tasks across multiple threads.
MultiThread,
}
/// The runtime scheduler is either a multi-thread or a current-thread executor.... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | b1f40f4356c7f7be0e1959f992608d2058a76deb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b1f40f4356c7f7be0e1959f992608d2058a76deb/tokio/src/runtime/mod.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:11 | /// Spawns a future onto the Tokio runtime.
///
/// This spawns the given future onto the runtime's executor, usually a
/// thread pool. The thread pool is then responsible for polling the future
/// until it completes.
///
/// You do not have to `.await` the returned `Jo... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | b1f40f4356c7f7be0e1959f992608d2058a76deb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b1f40f4356c7f7be0e1959f992608d2058a76deb/tokio/src/runtime/mod.rs | 401 | 460 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:16 | /// Shuts down the runtime, without waiting for any spawned tasks to shutdown.
///
/// This can be useful if you want to drop a runtime from within another runtime.
/// Normally, dropping a runtime will block indefinitely for spawned blocking tasks
/// to complete, which would normally n... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | b1f40f4356c7f7be0e1959f992608d2058a76deb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b1f40f4356c7f7be0e1959f992608d2058a76deb/tokio/src/runtime/mod.rs | 601 | 660 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:17 | None => {
// The context thread-local has already been destroyed.
//
// We don't set the guard in this case. Calls to tokio::spawn in task
// destructors would fail regardless if this happens.
... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | b1f40f4356c7f7be0e1959f992608d2058a76deb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b1f40f4356c7f7be0e1959f992608d2058a76deb/tokio/src/runtime/mod.rs | 641 | 666 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:16 | /// Shuts down the runtime, without waiting for any spawned tasks to shutdown.
///
/// This can be useful if you want to drop a runtime from within another runtime.
/// Normally, dropping a runtime will block indefinitely for spawned blocking tasks
/// to complete, which would normally n... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | df99428c17ff03134d8f081ee80ef0f6fbe3c813 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/df99428c17ff03134d8f081ee80ef0f6fbe3c813/tokio/src/runtime/mod.rs | 601 | 660 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:5 | //! Any tasks that have not yet completed will be dropped.
//!
//! [tasks]: crate::task
//! [`Runtime`]: Runtime
//! [`tokio::spawn`]: crate::spawn
//! [`tokio::main`]: ../attr.main.html
//! [runtime builder]: crate::runtime::Builder
//! [`Runtime::new`]: crate::runtime::Runtime::new
//! [`Builder::threaded_scheduler`]... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | fe1843c0e02473564ad3adc90b2c033d7c363df1 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/fe1843c0e02473564ad3adc90b2c033d7c363df1/tokio/src/runtime/mod.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | pub(crate) mod task;
use scheduler::CurrentThread;
mod config;
use config::Config;
mod blocking;
use blocking::BlockingPool;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use blocking::Mandatory;
}
cfg... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | fe1843c0e02473564ad3adc90b2c033d7c363df1 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/fe1843c0e02473564ad3adc90b2c033d7c363df1/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | pub(crate) use metrics::IoDriverMetrics;
}
}
cfg_not_metrics! {
pub(crate) mod metrics;
pub(crate) use metrics::{SchedulerMetrics, WorkerMetrics, MetricsBatch};
}
}
cfg_rt_multi_thread! {
use driver::Driver;
use scheduler::MultiThread;
}
cfg_rt! {
use crate::task::Joi... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | fe1843c0e02473564ad3adc90b2c033d7c363df1 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/fe1843c0e02473564ad3adc90b2c033d7c363df1/tokio/src/runtime/mod.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:8 | /// * Drop the reactor.
///
/// Once the reactor has dropped, any outstanding I/O resources bound to
/// that reactor will no longer function. Calling any method on them will
/// result in an error.
///
/// # Sharing
///
/// The Tokio runtime implements `Sync` and `Send` to allow you to ... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | fe1843c0e02473564ad3adc90b2c033d7c363df1 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/fe1843c0e02473564ad3adc90b2c033d7c363df1/tokio/src/runtime/mod.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:9 | /// The flavor that executes tasks across multiple threads.
MultiThread,
}
/// The runtime scheduler is either a multi-thread or a current-thread executor.
#[derive(Debug)]
enum Scheduler {
/// Execute all tasks on the current-thread.
CurrentThread(CurrentThread),
/// E... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | fe1843c0e02473564ad3adc90b2c033d7c363df1 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/fe1843c0e02473564ad3adc90b2c033d7c363df1/tokio/src/runtime/mod.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:16 | /// to complete, which would normally not be permitted within an asynchronous context.
/// By calling `shutdown_background()`, you can drop the runtime from such a context.
///
/// Note however, that because we do not wait for any blocking tasks to complete, this
/// may result in a reso... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | fe1843c0e02473564ad3adc90b2c033d7c363df1 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/fe1843c0e02473564ad3adc90b2c033d7c363df1/tokio/src/runtime/mod.rs | 601 | 660 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:17 | // destructors would fail regardless if this happens.
},
}
},
#[cfg(all(feature = "rt-multi-thread", not(tokio_wasi)))]
Scheduler::MultiThread(_) => {
// The threaded scheduler drops its tasks on its worker t... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | fe1843c0e02473564ad3adc90b2c033d7c363df1 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/fe1843c0e02473564ad3adc90b2c033d7c363df1/tokio/src/runtime/mod.rs | 641 | 662 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | pub(crate) mod task;
use scheduler::CurrentThread;
mod config;
use config::Config;
mod blocking;
use blocking::BlockingPool;
#[cfg_attr(tokio_wasi, allow(unused_imports))]
pub(crate) use blocking::spawn_blocking;
cfg_trace! {
pub(crate) use blocking::Mandatory;
}
cfg... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 58c457190b8a79b7ed8a76910e4d84d9d5de163d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/58c457190b8a79b7ed8a76910e4d84d9d5de163d/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:7 | cfg_net! {
pub(crate) use metrics::IoDriverMetrics;
}
}
cfg_not_metrics! {
pub(crate) mod metrics;
pub(crate) use metrics::{SchedulerMetrics, WorkerMetrics, MetricsBatch};
}
}
cfg_rt_multi_thread! {
use driver::Driver;
use scheduler::MultiThread;
}
cfg_rt! {
u... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 58c457190b8a79b7ed8a76910e4d84d9d5de163d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/58c457190b8a79b7ed8a76910e4d84d9d5de163d/tokio/src/runtime/mod.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:8 | /// * Drain any scheduled work queues.
/// * Drop any futures that have not yet completed.
/// * Drop the reactor.
///
/// Once the reactor has dropped, any outstanding I/O resources bound to
/// that reactor will no longer function. Calling any method on them will
/// result in an error.
//... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 58c457190b8a79b7ed8a76910e4d84d9d5de163d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/58c457190b8a79b7ed8a76910e4d84d9d5de163d/tokio/src/runtime/mod.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:11 | /// # Examples
///
/// ```
/// use tokio::runtime::Runtime;
///
/// # fn dox() {
/// // Create the runtime
/// let rt = Runtime::new().unwrap();
///
/// // Spawn a future onto the runtime
/// rt.spawn(async {
/// println!("now r... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 58c457190b8a79b7ed8a76910e4d84d9d5de163d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/58c457190b8a79b7ed8a76910e4d84d9d5de163d/tokio/src/runtime/mod.rs | 401 | 460 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:16 | /// use tokio::runtime::Runtime;
///
/// fn main() {
/// let runtime = Runtime::new().unwrap();
///
/// runtime.block_on(async move {
/// let inner_runtime = Runtime::new().unwrap();
/// // ...
/// inner_runtime.shutdown_backgrou... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 58c457190b8a79b7ed8a76910e4d84d9d5de163d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/58c457190b8a79b7ed8a76910e4d84d9d5de163d/tokio/src/runtime/mod.rs | 601 | 652 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:17 | }
}
cfg_metrics! {
impl Runtime {
/// TODO
pub fn metrics(&self) -> RuntimeMetrics {
self.handle.metrics()
}
}
}
} | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 58c457190b8a79b7ed8a76910e4d84d9d5de163d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/58c457190b8a79b7ed8a76910e4d84d9d5de163d/tokio/src/runtime/mod.rs | 641 | 652 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:4 | //!
//! [driver]: crate::io::driver
//! [executor]: https://tokio.rs/docs/internals/runtime-model/#executors
//! [`Runtime`]: struct.Runtime.html
//! [`Reactor`]: ../reactor/struct.Reactor.html
//! [`run`]: fn.run.html
//! [`tokio::spawn`]: ../executor/fn.spawn.html
//! [`tokio::main`]: ../../tokio_macros/attr.main.htm... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | bc150cd0b56cf6dcb7c4feab64e83b9938faa186 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/bc150cd0b56cf6dcb7c4feab64e83b9938faa186/tokio/src/runtime/mod.rs | 121 | 180 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:5 | mod shell;
use self::shell::Shell;
mod time;
cfg_rt_threaded! {
pub(crate) mod thread_pool;
use self::thread_pool::ThreadPool;
}
cfg_rt_core! {
use crate::task::JoinHandle;
}
use std::future::Future;
/// The Tokio runtime, includes a reactor as well as an executor for running
/// tasks.
///
/// Instanc... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | bc150cd0b56cf6dcb7c4feab64e83b9938faa186 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/bc150cd0b56cf6dcb7c4feab64e83b9938faa186/tokio/src/runtime/mod.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:6 | /// [`Builder`]: struct.Builder.html
/// [`tokio::run`]: fn.run.html
#[derive(Debug)]
pub struct Runtime {
/// Task executor
kind: Kind,
/// Handle to runtime, also contains driver handles
handle: Handle,
/// Blocking pool handle, used to signal shutdown
blocking_pool: BlockingPool,
}
/// The... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | bc150cd0b56cf6dcb7c4feab64e83b9938faa186 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/bc150cd0b56cf6dcb7c4feab64e83b9938faa186/tokio/src/runtime/mod.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:8 | ///
/// ```
/// use tokio::runtime::Runtime;
///
/// # fn dox() {
/// // Create the runtime
/// let rt = Runtime::new().unwrap();
///
/// // Spawn a future onto the runtime
/// rt.spawn(async {
/// println!("now running on a worker thread");
/// });
/// # }
/// ``... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | bc150cd0b56cf6dcb7c4feab64e83b9938faa186 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/bc150cd0b56cf6dcb7c4feab64e83b9938faa186/tokio/src/runtime/mod.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:9 | /// This method should not be called from an asynchronous context.
///
/// # Panics
///
/// This function panics if the executor is at capacity, if the provided
/// future panics, or if called within an asynchronous execution context.
pub fn block_on<F: Future>(&mut self, future: F) -> F::Output... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | bc150cd0b56cf6dcb7c4feab64e83b9938faa186 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/bc150cd0b56cf6dcb7c4feab64e83b9938faa186/tokio/src/runtime/mod.rs | 321 | 366 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:4 | //!
//! [driver]: tokio::net::driver
//! [executor]: https://tokio.rs/docs/internals/runtime-model/#executors
//! [`Runtime`]: struct.Runtime.html
//! [`Reactor`]: ../reactor/struct.Reactor.html
//! [`run`]: fn.run.html
//! [`tokio::spawn`]: ../executor/fn.spawn.html
//! [`tokio::main`]: ../../tokio_macros/attr.main.ht... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 0d38936b35779b604770120da2e98560bbb6241f | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0d38936b35779b604770120da2e98560bbb6241f/tokio/src/runtime/mod.rs | 121 | 180 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:4 | //!
//! [driver]: tokio::net::driver
//! [executor]: https://tokio.rs/docs/internals/runtime-model/#executors
//! [`Runtime`]: struct.Runtime.html
//! [`Reactor`]: ../reactor/struct.Reactor.html
//! [`run`]: fn.run.html
//! [`tokio::spawn`]: ../executor/fn.spawn.html
//! [`tokio::main`]: ../../tokio_macros/attr.main.ht... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 19f1fc36bd567377bde4a2c6818c6b606d89d488 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/19f1fc36bd567377bde4a2c6818c6b606d89d488/tokio/src/runtime/mod.rs | 121 | 180 |
tokio-rs/tokio:tokio/src/runtime/mod.rs:5 | mod shell;
use self::shell::Shell;
mod time;
#[cfg(feature = "rt-full")]
pub(crate) mod thread_pool;
#[cfg(feature = "rt-full")]
use self::thread_pool::ThreadPool;
#[cfg(feature = "rt-core")]
use crate::task::JoinHandle;
use std::future::Future;
/// The Tokio runtime, includes a reactor as well as an executor for ... | rust | rust | macro-heavy | tokio-rs/tokio | tokio/src/runtime/mod.rs | MIT | 19f1fc36bd567377bde4a2c6818c6b606d89d488 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/19f1fc36bd567377bde4a2c6818c6b606d89d488/tokio/src/runtime/mod.rs | 161 | 220 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.