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/handle.rs:2 | /// Run the provided function on an executor dedicated to blocking operations.
pub(crate) fn spawn_blocking<F, R>(&self, func: F) -> JoinHandle<R>
where
F: FnOnce() -> R + Send + 'static,
{
#[cfg(feature = "tracing")]
let func = {
let span = tracing::trace_span!(
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 7fbfa9b649b16de6096eb673f8debfb900618987 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7fbfa9b649b16de6096eb673f8debfb900618987/tokio/src/runtime/handle.rs | 41 | 64 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | use crate::runtime::{blocking, driver, Spawner};
/// Handle to the runtime.
///
/// The handle is internally reference-counted and can be freely cloned. A handle can be
/// obtained using the [`Runtime::handle`] method.
///
/// [`Runtime::handle`]: crate::runtime::Runtime::handle()
#[derive(Debug, Clone)]
pub(crate) s... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 00b6127f2ed3125f8b305ab4fd9bb90e99762785 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/00b6127f2ed3125f8b305ab4fd9bb90e99762785/tokio/src/runtime/handle.rs | 1 | 39 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | use crate::runtime::{blocking, context, driver, Spawner};
/// Handle to the runtime.
///
/// The handle is internally reference-counted and can be freely cloned. A handle can be
/// obtained using the [`Runtime::handle`] method.
///
/// [`Runtime::handle`]: crate::runtime::Runtime::handle()
#[derive(Debug, Clone)]
pub... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 60d81bbe10faf344ea18438a1c5ecb9173e6ec52 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/60d81bbe10faf344ea18438a1c5ecb9173e6ec52/tokio/src/runtime/handle.rs | 1 | 39 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | use crate::runtime::{blocking, context, driver, Spawner};
/// Handle to the runtime.
///
/// The handle is internally reference-counted and can be freely cloned. A handle can be
/// obtained using the [`Runtime::handle`] method.
///
/// [`Runtime::handle`]: crate::runtime::Runtime::handle()
#[derive(Debug, Clone)]
pub... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 7ae5b7bd4f93612f91ab504ffb63aa8241c1d7bb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7ae5b7bd4f93612f91ab504ffb63aa8241c1d7bb/tokio/src/runtime/handle.rs | 1 | 39 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | use crate::runtime::{blocking, context, io, time, Spawner};
/// Handle to the runtime.
///
/// The handle is internally reference-counted and can be freely cloned. A handle can be
/// obtained using the [`Runtime::handle`] method.
///
/// [`Runtime::handle`]: crate::runtime::Runtime::handle()
#[derive(Debug, Clone)]
p... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | d600ab9a8f37e9eff3fa8587069a816b65b6da0b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d600ab9a8f37e9eff3fa8587069a816b65b6da0b/tokio/src/runtime/handle.rs | 1 | 36 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | use crate::runtime::{blocking, context, io, time, Spawner};
use std::{error, fmt};
cfg_rt_core! {
use crate::task::JoinHandle;
use std::future::Future;
}
/// Handle to the runtime.
///
/// The handle is internally reference-counted and can be freely cloned. A handle can be
/// obtained using the [`Runtime::h... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | d8139fef7a555f99adaa37e139787d26e24daba3 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d8139fef7a555f99adaa37e139787d26e24daba3/tokio/src/runtime/handle.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:4 | }
/// Run a future to completion on the Tokio runtime from a synchronous
/// context.
///
/// This runs the given future on the runtime, blocking until it is
/// complete, and yielding its resolved result. Any tasks or timers which
/// the future spawns internally will b... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | d8139fef7a555f99adaa37e139787d26e24daba3 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d8139fef7a555f99adaa37e139787d26e24daba3/tokio/src/runtime/handle.rs | 121 | 180 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:5 | })
}
}
}
/// Error returned by `try_current` when no Runtime has been started
pub struct TryCurrentError(());
impl fmt::Debug for TryCurrentError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("TryCurrentError").finish()
}
}
impl fmt::Display for TryCurrentErr... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | d8139fef7a555f99adaa37e139787d26e24daba3 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d8139fef7a555f99adaa37e139787d26e24daba3/tokio/src/runtime/handle.rs | 161 | 181 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:3 | cfg_rt_core! {
impl Handle {
/// 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.
///
/// See... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 602ad2e0ba41467f08052e152d5808ee6a695afe | github | async-runtime | https://github.com/tokio-rs/tokio/blob/602ad2e0ba41467f08052e152d5808ee6a695afe/tokio/src/runtime/handle.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:4 | }
}
}
/// Error returned by `try_current` when no Runtime has been started
pub struct TryCurrentError(());
impl fmt::Debug for TryCurrentError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("TryCurrentError").finish()
}
}
impl fmt::Display for TryCurrentError {
fn... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 602ad2e0ba41467f08052e152d5808ee6a695afe | github | async-runtime | https://github.com/tokio-rs/tokio/blob/602ad2e0ba41467f08052e152d5808ee6a695afe/tokio/src/runtime/handle.rs | 121 | 140 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | use crate::runtime::{blocking, context, io, time, Spawner};
use std::{error, fmt};
cfg_rt_core! {
use crate::task::JoinHandle;
use std::future::Future;
}
/// Handle to the runtime
#[derive(Debug, Clone)]
pub struct Handle {
pub(super) spawner: Spawner,
/// Handles to the I/O drivers
pub(super) i... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | f9ddb93604a830d106475bd4c4cae436fafcc0da | github | async-runtime | https://github.com/tokio-rs/tokio/blob/f9ddb93604a830d106475bd4c4cae436fafcc0da/tokio/src/runtime/handle.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:3 | /// thread pool. The thread pool is then responsible for polling the future
/// until it completes.
///
/// See [module level][mod] documentation for more details.
///
/// [mod]: index.html
///
/// # Examples
///
/// ```
/// use tokio::runt... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | f9ddb93604a830d106475bd4c4cae436fafcc0da | github | async-runtime | https://github.com/tokio-rs/tokio/blob/f9ddb93604a830d106475bd4c4cae436fafcc0da/tokio/src/runtime/handle.rs | 81 | 134 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:4 | impl fmt::Debug for TryCurrentError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("TryCurrentError").finish()
}
}
impl fmt::Display for TryCurrentError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("no tokio Runtime has been initializ... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | f9ddb93604a830d106475bd4c4cae436fafcc0da | github | async-runtime | https://github.com/tokio-rs/tokio/blob/f9ddb93604a830d106475bd4c4cae436fafcc0da/tokio/src/runtime/handle.rs | 121 | 134 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | use crate::runtime::{blocking, context, io, time, Spawner};
cfg_rt_core! {
use crate::task::JoinHandle;
use std::future::Future;
}
/// Handle to the runtime
#[derive(Debug, Clone)]
pub struct Handle {
pub(super) spawner: Spawner,
/// Handles to the I/O drivers
pub(super) io_handle: io::Handle,
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 45da5f3510a61599c89dc458ecc859f13a81e255 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/45da5f3510a61599c89dc458ecc859f13a81e255/tokio/src/runtime/handle.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:3 | /// use tokio::runtime::Runtime;
///
/// # fn dox() {
/// // Create the runtime
/// let rt = Runtime::new().unwrap();
/// let handle = rt.handle();
///
/// // Spawn a future onto the runtime
/// handle.spawn(async {
/// println!("now running on... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 45da5f3510a61599c89dc458ecc859f13a81e255 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/45da5f3510a61599c89dc458ecc859f13a81e255/tokio/src/runtime/handle.rs | 81 | 107 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | use crate::runtime::{blocking, context, io, time, Spawner};
cfg_rt_core! {
use crate::task::JoinHandle;
use std::future::Future;
}
/// Handle to the runtime
#[derive(Debug, Clone)]
pub struct Handle {
pub(super) spawner: Spawner,
/// Handles to the I/O drivers
pub(super) io_handle: io::Handle,
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 0193df3a593cb69d23414109118784de2948024c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0193df3a593cb69d23414109118784de2948024c/tokio/src/runtime/handle.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:2 | f()
}
/// Returns a Handle view over the currently running Runtime
///
/// # Panic
///
/// A Runtime must have been started or this will panic
///
/// # Examples
///
/// This allows for the current handle to be gotten when running in a `#`
///
/// ```
/// # use tokio... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 0193df3a593cb69d23414109118784de2948024c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0193df3a593cb69d23414109118784de2948024c/tokio/src/runtime/handle.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:3 | }
}
}
cfg_rt_core! {
impl Handle {
/// Spawn 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.
///
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 0193df3a593cb69d23414109118784de2948024c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0193df3a593cb69d23414109118784de2948024c/tokio/src/runtime/handle.rs | 81 | 126 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | use crate::runtime::{blocking, context, io, time, Spawner};
cfg_rt_core! {
use crate::task::JoinHandle;
use std::future::Future;
}
/// Handle to the runtime
#[derive(Debug, Clone)]
pub struct Handle {
pub(super) spawner: Spawner,
/// Handles to the I/O drivers
pub(super) io_handle: io::Handle,
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 67bf9c36f347031ca05872d102a7f9abc8b465f0 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/67bf9c36f347031ca05872d102a7f9abc8b465f0/tokio/src/runtime/handle.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:2 | }
}
cfg_rt_core! {
impl Handle {
/// Spawn 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.
///
///... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 67bf9c36f347031ca05872d102a7f9abc8b465f0 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/67bf9c36f347031ca05872d102a7f9abc8b465f0/tokio/src/runtime/handle.rs | 41 | 85 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | use crate::runtime::{blocking, io, time, Spawner};
cfg_rt_core! {
use crate::task::JoinHandle;
use std::future::Future;
}
/// Handle to the runtime
#[derive(Debug, Clone)]
pub struct Handle {
pub(super) spawner: Spawner,
/// Handles to the I/O drivers
pub(super) io_handle: io::Handle,
/// H... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 8546ff826db8dba1e39b4119ad909fb6cab2492a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8546ff826db8dba1e39b4119ad909fb6cab2492a/tokio/src/runtime/handle.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:2 | cfg_rt_core! {
impl Handle {
/// Spawn 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.
///
/// See ... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 8546ff826db8dba1e39b4119ad909fb6cab2492a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8546ff826db8dba1e39b4119ad909fb6cab2492a/tokio/src/runtime/handle.rs | 41 | 82 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | use crate::runtime::{blocking, io, time};
cfg_rt_core! {
use crate::runtime::basic_scheduler;
use crate::task::JoinHandle;
use std::future::Future;
}
cfg_rt_threaded! {
use crate::runtime::thread_pool;
}
/// Handle to the runtime
#[derive(Debug, Clone)]
pub struct Handle {
pub(super) kind: Kind,... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 0d38936b35779b604770120da2e98560bbb6241f | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0d38936b35779b604770120da2e98560bbb6241f/tokio/src/runtime/handle.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:2 | /// Enter the runtime context
pub fn enter<F, R>(&self, f: F) -> R
where
F: FnOnce() -> R,
{
self.blocking_spawner.enter(|| {
let _io = io::set_default(&self.io_handles[0]);
time::with_default(&self.time_handles[0], &self.clock, || match &self.kind {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 0d38936b35779b604770120da2e98560bbb6241f | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0d38936b35779b604770120da2e98560bbb6241f/tokio/src/runtime/handle.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:3 | ///
/// // Spawn a future onto the runtime
/// handle.spawn(async {
/// println!("now running on a worker thread");
/// });
/// # }
/// ```
///
/// # Panics
///
/// This function panics if the spawn fails. Failure occurs if the executor... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 0d38936b35779b604770120da2e98560bbb6241f | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0d38936b35779b604770120da2e98560bbb6241f/tokio/src/runtime/handle.rs | 81 | 107 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | #[cfg(feature = "rt-core")]
use crate::runtime::basic_scheduler;
#[cfg(feature = "rt-full")]
use crate::runtime::thread_pool;
use crate::runtime::{blocking, io, time};
#[cfg(feature = "rt-core")]
use crate::task::JoinHandle;
#[cfg(feature = "rt-core")]
use std::future::Future;
/// Handle to the runtime
#[derive(Debug... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 4d19a999371190e25f6138916d93e6c75093e4a6 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/4d19a999371190e25f6138916d93e6c75093e4a6/tokio/src/runtime/handle.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:2 | /// 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.
///
/// See [module level][mod] documentation for more details.
///
/// [mod]: index.html
///
/// # Examples
///... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 4d19a999371190e25f6138916d93e6c75093e4a6 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/4d19a999371190e25f6138916d93e6c75093e4a6/tokio/src/runtime/handle.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:3 | Kind::ThreadPool(spawner) => spawner.spawn(future),
}
}
/// Enter the runtime context
pub fn enter<F, R>(&self, f: F) -> R
where
F: FnOnce() -> R,
{
self.blocking_spawner.enter(|| {
let _io = io::set_default(&self.io_handles[0]);
time::with_default(&... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 4d19a999371190e25f6138916d93e6c75093e4a6 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/4d19a999371190e25f6138916d93e6c75093e4a6/tokio/src/runtime/handle.rs | 81 | 102 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:2 | /// 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.
///
/// See [module level][mod] documentation for more details.
///
/// [mod]: index.html
///
/// # Examples
///... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 3f0eabe7798de624f5ee9c7562803bfb97e6088f | github | async-runtime | https://github.com/tokio-rs/tokio/blob/3f0eabe7798de624f5ee9c7562803bfb97e6088f/tokio/src/runtime/handle.rs | 41 | 96 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:3 | Kind::ThreadPool(spawner) => spawner.spawn(future),
}
}
/// Enter the runtime context
pub fn enter<F, R>(&self, f: F) -> R
where
F: FnOnce() -> R,
{
self.blocking_spawner.enter(|| {
let _io = io::set_default(&self.io_handles[0]);
time::with_default(&... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 3f0eabe7798de624f5ee9c7562803bfb97e6088f | github | async-runtime | https://github.com/tokio-rs/tokio/blob/3f0eabe7798de624f5ee9c7562803bfb97e6088f/tokio/src/runtime/handle.rs | 81 | 96 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:1 | #[cfg(feature = "rt-core")]
use crate::runtime::current_thread;
#[cfg(feature = "rt-full")]
use crate::runtime::thread_pool;
use crate::runtime::{blocking, io, time};
#[cfg(feature = "rt-core")]
use crate::task::JoinHandle;
#[cfg(feature = "rt-core")]
use std::future::Future;
/// Handle to the runtime
#[derive(Debug,... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 1474794055e291c544c3c95d6381d549cefbd7d5 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/1474794055e291c544c3c95d6381d549cefbd7d5/tokio/src/runtime/handle.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/handle.rs:2 | /// 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.
///
/// See [module level][mod] documentation for more details.
///
/// [mod]: index.html
///
/// # Examples
///... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/handle.rs | MIT | 1474794055e291c544c3c95d6381d549cefbd7d5 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/1474794055e291c544c3c95d6381d549cefbd7d5/tokio/src/runtime/handle.rs | 41 | 96 |
tokio-rs/tokio:tokio/src/runtime/id.rs:1 | use std::fmt;
use std::num::NonZeroU64;
/// An opaque ID that uniquely identifies a runtime relative to all other currently
/// running runtimes.
///
/// # Notes
///
/// - Runtime IDs are unique relative to other *currently running* runtimes.
/// When a runtime completes, the same ID may be used for another runtime.... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/id.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/runtime/id.rs | 1 | 42 |
tokio-rs/tokio:tokio/src/runtime/id.rs:1 | use std::fmt;
use std::num::{NonZeroU32, NonZeroU64};
/// An opaque ID that uniquely identifies a runtime relative to all other currently
/// running runtimes.
///
/// # Notes
///
/// - Runtime IDs are unique relative to other *currently running* runtimes.
/// When a runtime completes, the same ID may be used for an... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/id.rs | MIT | 8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d/tokio/src/runtime/id.rs | 1 | 55 |
tokio-rs/tokio:tokio/src/runtime/id.rs:1 | use std::fmt;
use std::num::{NonZeroU32, NonZeroU64};
/// An opaque ID that uniquely identifies a runtime relative to all other currently
/// running runtimes.
///
/// # Notes
///
/// - Runtime IDs are unique relative to other *currently running* runtimes.
/// When a runtime completes, the same ID may be used for an... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/id.rs | MIT | 3a4aef17b2c70d255affa51eb473efcf703896e4 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/3a4aef17b2c70d255affa51eb473efcf703896e4/tokio/src/runtime/id.rs | 1 | 52 |
tokio-rs/tokio:tokio/src/runtime/id.rs:1 | use std::fmt;
use std::num::NonZeroU64;
/// An opaque ID that uniquely identifies a runtime relative to all other currently
/// running runtimes.
///
/// # Notes
///
/// - Runtime IDs are unique relative to other *currently running* runtimes.
/// When a runtime completes, the same ID may be used for another runtime.... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/id.rs | MIT | 63577cd8d3f2b1a1c787870125ab808eaa1eaa99 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/63577cd8d3f2b1a1c787870125ab808eaa1eaa99/tokio/src/runtime/id.rs | 1 | 46 |
tokio-rs/tokio:tokio/src/runtime/io.rs:1 | //! Abstracts out the APIs necessary to `Runtime` for integrating the I/O
//! driver. When the `time` feature flag is **not** enabled. These APIs are
//! shells. This isolates the complexity of dealing with conditional
//! compilation.
/// Re-exported for convenience.
pub(crate) use std::io::Result;
pub(crate) use va... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io.rs | MIT | 45da5f3510a61599c89dc458ecc859f13a81e255 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/45da5f3510a61599c89dc458ecc859f13a81e255/tokio/src/runtime/io.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/io.rs:2 | Ok((Either::B(driver), None))
}
}
}
#[cfg(not(feature = "io-driver"))]
mod variant {
use crate::park::ParkThread;
use std::io;
/// I/O is not enabled, use a condition variable based parker
pub(crate) type Driver = ParkThread;
/// There is no handle
pub(crate) type Handle = ();
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io.rs | MIT | 45da5f3510a61599c89dc458ecc859f13a81e255 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/45da5f3510a61599c89dc458ecc859f13a81e255/tokio/src/runtime/io.rs | 41 | 63 |
tokio-rs/tokio:tokio/src/runtime/io.rs:1 | //! Abstracts out the APIs necessary to `Runtime` for integrating the I/O
//! driver. When the `time` feature flag is **not** enabled. These APIs are
//! shells. This isolates the complexity of dealing with conditional
//! compilation.
/// Re-exported for convenience.
pub(crate) use std::io::Result;
pub(crate) use va... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io.rs | MIT | 67bf9c36f347031ca05872d102a7f9abc8b465f0 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/67bf9c36f347031ca05872d102a7f9abc8b465f0/tokio/src/runtime/io.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/io.rs:1 | //! Abstracts out the APIs necessary to `Runtime` for integrating the I/O
//! driver. When the `time` feature flag is **not** enabled. These APIs are
//! shells. This isolates the complexity of dealing with conditional
//! compilation.
/// Re-exported for convenience.
pub(crate) use std::io::Result;
pub(crate) use va... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io.rs | MIT | 8546ff826db8dba1e39b4119ad909fb6cab2492a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8546ff826db8dba1e39b4119ad909fb6cab2492a/tokio/src/runtime/io.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/io.rs:2 | pub(crate) fn set_default(handle: &Handle) -> Option<driver::DefaultGuard<'_>> {
handle.as_ref().map(|handle| driver::set_default(handle))
}
}
#[cfg(any(not(feature = "io-driver"), loom))]
mod variant {
use crate::park::ParkThread;
use std::io;
/// I/O is not enabled, use a condition variable... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io.rs | MIT | 8546ff826db8dba1e39b4119ad909fb6cab2492a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8546ff826db8dba1e39b4119ad909fb6cab2492a/tokio/src/runtime/io.rs | 41 | 66 |
tokio-rs/tokio:tokio/src/runtime/io.rs:1 | //! Abstracts out the APIs necessary to `Runtime` for integrating the I/O
//! driver. When the `time` feature flag is **not** enabled. These APIs are
//! shells. This isolates the complexity of dealing with conditional
//! compilation.
/// Re-exported for convenience.
pub(crate) use std::io::Result;
cfg_io_driver! {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io.rs | MIT | 69975fb9601bbb21659db283d888470733bae660 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/69975fb9601bbb21659db283d888470733bae660/tokio/src/runtime/io.rs | 1 | 56 |
tokio-rs/tokio:tokio/src/runtime/io.rs:1 | //! Abstracts out the APIs necessary to `Runtime` for integrating the I/O
//! driver. When the `time` feature flag is **not** enabled. These APIs are
//! shells. This isolates the complexity of dealing with conditional
//! compilation.
/// Re-exported for convenience.
pub(crate) use std::io::Result;
cfg_io_driver! {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io.rs | MIT | 0d38936b35779b604770120da2e98560bbb6241f | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0d38936b35779b604770120da2e98560bbb6241f/tokio/src/runtime/io.rs | 1 | 56 |
tokio-rs/tokio:tokio/src/runtime/io.rs:1 | //! Abstracts out the APIs necessary to `Runtime` for integrating the I/O
//! driver. When the `time` feature flag is **not** enabled. These APIs are
//! shells. This isolates the complexity of dealing with conditional
//! compilation.
pub(crate) use self::variant::*;
/// Re-exported for convenience.
pub(crate) use s... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io.rs | MIT | 27e5b41067d01c0c9fac230c5addb58034201a63 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/27e5b41067d01c0c9fac230c5addb58034201a63/tokio/src/runtime/io.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/io.rs:1 | pub(crate) use self::variant::*;
/// Re-exported for convenience.
pub(crate) use std::io::Result;
#[cfg(feature = "net-driver")]
mod variant {
use crate::net::driver;
use std::io;
/// The driver value the runtime passes to the `timer` layer.
///
/// When the `io-driver` feature is enabled, this ... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io.rs | MIT | d5c1119c881c9a8b511aa9000fd26b9bda014256 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d5c1119c881c9a8b511aa9000fd26b9bda014256/tokio/src/runtime/io.rs | 1 | 56 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:1 | // Signal handling
cfg_signal_internal_and_unix! {
mod signal;
}
cfg_io_uring! {
mod uring;
use uring::UringContext;
use crate::sync::OnceCell;
}
use crate::io::interest::Interest;
use crate::io::ready::Ready;
use crate::loom::sync::Mutex;
use crate::runtime::driver;
use crate::runtime::io::registratio... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/runtime/io/driver.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:2 | /// Tracks all registrations
registrations: RegistrationSet,
/// State that should be synchronized
synced: Mutex<registration_set::Synced>,
/// Used to wake up the reactor from a call to `turn`.
/// Not supported on `Wasi` due to lack of threading support.
#[cfg(not(target_os = "wasi"))]
w... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/runtime/io/driver.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:3 | impl ReadyEvent {
pub(crate) fn with_ready(&self, ready: Ready) -> Self {
Self {
ready,
tick: self.tick,
is_shutdown: self.is_shutdown,
}
}
}
);
#[derive(Debug, Eq, PartialEq, Clone, Copy)]
pub(super) enum Direction {
Read,... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/runtime/io/driver.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:4 | let registry = poll.registry().try_clone()?;
let driver = Driver {
signal_ready: false,
events: mio::Events::with_capacity(nevents),
poll,
};
let (registrations, synced) = RegistrationSet::new();
let handle = Handle {
registry,
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/runtime/io/driver.rs | 121 | 180 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:5 | self.turn(handle, None);
}
pub(crate) fn park_timeout(&mut self, rt_handle: &driver::Handle, duration: Duration) {
let handle = rt_handle.io();
self.turn(handle, Some(duration));
}
pub(crate) fn shutdown(&mut self, rt_handle: &driver::Handle) {
let handle = rt_handle.io();
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/runtime/io/driver.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:6 | for event in events.iter() {
let token = event.token();
if token == TOKEN_WAKEUP {
// Nothing to do, the event is used to unblock the I/O driver
} else if token == TOKEN_SIGNAL {
self.signal_ready = true;
} else {
let ready... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/runtime/io/driver.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:7 | impl fmt::Debug for Driver {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Driver")
}
}
impl Handle {
/// Forces a reactor blocked in a call to `turn` to wakeup, or otherwise
/// makes the next call to `turn` return immediately.
///
/// This method is intended to... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/runtime/io/driver.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:8 | };
return Err(e);
}
// TODO: move this logic to `RegistrationSet` and use a `CountedLinkedList`
self.metrics.incr_fd_count();
Ok(scheduled_io)
}
/// Deregisters an I/O resource from the reactor.
pub(super) fn deregister_source(
&self,
registrat... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/runtime/io/driver.rs | 281 | 334 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:9 | impl fmt::Debug for Handle {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Handle")
}
}
impl Direction {
pub(super) fn mask(self) -> Ready {
match self {
Direction::Read => Ready::READABLE | Ready::READ_CLOSED,
Direction::Write => Ready::WRITA... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/runtime/io/driver.rs | 321 | 334 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:7 | impl fmt::Debug for Driver {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Driver")
}
}
impl Handle {
/// Forces a reactor blocked in a call to `turn` to wakeup, or otherwise
/// makes the next call to `turn` return immediately.
///
/// This method is intended to... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 7a2135f426ab560a9efb320620f80e1935c43d31 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7a2135f426ab560a9efb320620f80e1935c43d31/tokio/src/runtime/io/driver.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:8 | };
return Err(e);
}
// TODO: move this logic to `RegistrationSet` and use a `CountedLinkedList`
self.metrics.incr_fd_count();
Ok(scheduled_io)
}
/// Deregisters an I/O resource from the reactor.
pub(super) fn deregister_source(
&self,
registrat... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 7a2135f426ab560a9efb320620f80e1935c43d31 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7a2135f426ab560a9efb320620f80e1935c43d31/tokio/src/runtime/io/driver.rs | 281 | 333 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:9 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Handle")
}
}
impl Direction {
pub(super) fn mask(self) -> Ready {
match self {
Direction::Read => Ready::READABLE | Ready::READ_CLOSED,
Direction::Write => Ready::WRITABLE | Ready::WRITE_CLOSED,
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 7a2135f426ab560a9efb320620f80e1935c43d31 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7a2135f426ab560a9efb320620f80e1935c43d31/tokio/src/runtime/io/driver.rs | 321 | 333 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:1 | // Signal handling
cfg_signal_internal_and_unix! {
mod signal;
}
cfg_io_uring! {
mod uring;
use uring::UringContext;
use crate::loom::sync::atomic::AtomicUsize;
}
use crate::io::interest::Interest;
use crate::io::ready::Ready;
use crate::loom::sync::Mutex;
use crate::runtime::driver;
use crate::runtime... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 0913cad381ead40ee194e881366bc136c8d8546c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0913cad381ead40ee194e881366bc136c8d8546c/tokio/src/runtime/io/driver.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:2 | /// Tracks all registrations
registrations: RegistrationSet,
/// State that should be synchronized
synced: Mutex<registration_set::Synced>,
/// Used to wake up the reactor from a call to `turn`.
/// Not supported on `Wasi` due to lack of threading support.
#[cfg(not(target_os = "wasi"))]
w... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 0913cad381ead40ee194e881366bc136c8d8546c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0913cad381ead40ee194e881366bc136c8d8546c/tokio/src/runtime/io/driver.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:4 | let registry = poll.registry().try_clone()?;
let driver = Driver {
signal_ready: false,
events: mio::Events::with_capacity(nevents),
poll,
};
let (registrations, synced) = RegistrationSet::new();
let handle = Handle {
registry,
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 0913cad381ead40ee194e881366bc136c8d8546c | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0913cad381ead40ee194e881366bc136c8d8546c/tokio/src/runtime/io/driver.rs | 121 | 180 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:1 | // Signal handling
cfg_signal_internal_and_unix! {
mod signal;
}
cfg_io_uring! {
mod uring;
use uring::UringContext;
// TODO: Replace with std after https://github.com/rust-lang/rust/issues/109737
use once_cell::sync::OnceCell;
}
use crate::io::interest::Interest;
use crate::io::ready::Ready;
use c... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | ff9681b3c62d63ca2703976d4767f29442bc87f2 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/ff9681b3c62d63ca2703976d4767f29442bc87f2/tokio/src/runtime/io/driver.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:2 | /// Tracks all registrations
registrations: RegistrationSet,
/// State that should be synchronized
synced: Mutex<registration_set::Synced>,
/// Used to wake up the reactor from a call to `turn`.
/// Not supported on `Wasi` due to lack of threading support.
#[cfg(not(target_os = "wasi"))]
w... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | ff9681b3c62d63ca2703976d4767f29442bc87f2 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/ff9681b3c62d63ca2703976d4767f29442bc87f2/tokio/src/runtime/io/driver.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:3 | cfg_net_unix!(
impl ReadyEvent {
pub(crate) fn with_ready(&self, ready: Ready) -> Self {
Self {
ready,
tick: self.tick,
is_shutdown: self.is_shutdown,
}
}
}
);
#[derive(Debug, Eq, PartialEq, Clone, Copy)]
pub(super) enum Di... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | ff9681b3c62d63ca2703976d4767f29442bc87f2 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/ff9681b3c62d63ca2703976d4767f29442bc87f2/tokio/src/runtime/io/driver.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:4 | let waker = mio::Waker::new(poll.registry(), TOKEN_WAKEUP)?;
let registry = poll.registry().try_clone()?;
let driver = Driver {
signal_ready: false,
events: mio::Events::with_capacity(nevents),
poll,
};
let (registrations, synced) = RegistrationSet::... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | ff9681b3c62d63ca2703976d4767f29442bc87f2 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/ff9681b3c62d63ca2703976d4767f29442bc87f2/tokio/src/runtime/io/driver.rs | 121 | 180 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:5 | let handle = rt_handle.io();
self.turn(handle, None);
}
pub(crate) fn park_timeout(&mut self, rt_handle: &driver::Handle, duration: Duration) {
let handle = rt_handle.io();
self.turn(handle, Some(duration));
}
pub(crate) fn shutdown(&mut self, rt_handle: &driver::Handle) {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | ff9681b3c62d63ca2703976d4767f29442bc87f2 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/ff9681b3c62d63ca2703976d4767f29442bc87f2/tokio/src/runtime/io/driver.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:6 | let mut ready_count = 0;
for event in events.iter() {
let token = event.token();
if token == TOKEN_WAKEUP {
// Nothing to do, the event is used to unblock the I/O driver
} else if token == TOKEN_SIGNAL {
self.signal_ready = true;
}... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | ff9681b3c62d63ca2703976d4767f29442bc87f2 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/ff9681b3c62d63ca2703976d4767f29442bc87f2/tokio/src/runtime/io/driver.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:7 | }
impl fmt::Debug for Driver {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Driver")
}
}
impl Handle {
/// Forces a reactor blocked in a call to `turn` to wakeup, or otherwise
/// makes the next call to `turn` return immediately.
///
/// This method is intended... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | ff9681b3c62d63ca2703976d4767f29442bc87f2 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/ff9681b3c62d63ca2703976d4767f29442bc87f2/tokio/src/runtime/io/driver.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:8 | .remove(&mut self.synced.lock(), &scheduled_io)
};
return Err(e);
}
// TODO: move this logic to `RegistrationSet` and use a `CountedLinkedList`
self.metrics.incr_fd_count();
Ok(scheduled_io)
}
/// Deregisters an I/O resource from the reactor.
pub(s... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | ff9681b3c62d63ca2703976d4767f29442bc87f2 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/ff9681b3c62d63ca2703976d4767f29442bc87f2/tokio/src/runtime/io/driver.rs | 281 | 334 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:1 | // Signal handling
cfg_signal_internal_and_unix! {
mod signal;
}
cfg_tokio_uring! {
mod uring;
use uring::UringContext;
use crate::loom::sync::atomic::AtomicUsize;
}
use crate::io::interest::Interest;
use crate::io::ready::Ready;
use crate::loom::sync::Mutex;
use crate::runtime::driver;
use crate::runt... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 9f848c9f544a87f52ca406bad895a2b0ffa10e4b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/9f848c9f544a87f52ca406bad895a2b0ffa10e4b/tokio/src/runtime/io/driver.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:2 | /// Tracks all registrations
registrations: RegistrationSet,
/// State that should be synchronized
synced: Mutex<registration_set::Synced>,
/// Used to wake up the reactor from a call to `turn`.
/// Not supported on `Wasi` due to lack of threading support.
#[cfg(not(target_os = "wasi"))]
w... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 9f848c9f544a87f52ca406bad895a2b0ffa10e4b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/9f848c9f544a87f52ca406bad895a2b0ffa10e4b/tokio/src/runtime/io/driver.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:3 | pub(super) enum Direction {
Read,
Write,
}
pub(super) enum Tick {
Set,
Clear(u8),
}
const TOKEN_WAKEUP: mio::Token = mio::Token(0);
const TOKEN_SIGNAL: mio::Token = mio::Token(1);
fn _assert_kinds() {
fn _assert<T: Send + Sync>() {}
_assert::<Handle>();
}
// ===== impl Driver =====
impl Dr... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 9f848c9f544a87f52ca406bad895a2b0ffa10e4b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/9f848c9f544a87f52ca406bad895a2b0ffa10e4b/tokio/src/runtime/io/driver.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:4 | registrations,
synced: Mutex::new(synced),
#[cfg(not(target_os = "wasi"))]
waker,
metrics: IoDriverMetrics::default(),
#[cfg(all(tokio_uring, feature = "rt", feature = "fs", target_os = "linux",))]
uring_context: Mutex::new(UringContext::new()),
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 9f848c9f544a87f52ca406bad895a2b0ffa10e4b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/9f848c9f544a87f52ca406bad895a2b0ffa10e4b/tokio/src/runtime/io/driver.rs | 121 | 180 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:5 | // Block waiting for an event to happen, peeling out how many events
// happened.
match self.poll.poll(events, max_wait) {
Ok(()) => {}
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
#[cfg(target_os = "wasi")]
Err(e) if e.kind() == io::ErrorKin... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 9f848c9f544a87f52ca406bad895a2b0ffa10e4b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/9f848c9f544a87f52ca406bad895a2b0ffa10e4b/tokio/src/runtime/io/driver.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:6 | #[cfg(all(tokio_uring, feature = "rt", feature = "fs", target_os = "linux",))]
{
let mut guard = handle.get_uring().lock();
let ctx = &mut *guard;
ctx.dispatch_completions();
}
handle.metrics.incr_ready_count_by(ready_count);
}
}
impl fmt::Debug for Driv... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 9f848c9f544a87f52ca406bad895a2b0ffa10e4b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/9f848c9f544a87f52ca406bad895a2b0ffa10e4b/tokio/src/runtime/io/driver.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:7 | let scheduled_io = self.registrations.allocate(&mut self.synced.lock())?;
let token = scheduled_io.token();
// we should remove the `scheduled_io` from the `registrations` set if registering
// the `source` with the OS fails. Otherwise it will leak the `scheduled_io`.
if let Err(e) = se... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 9f848c9f544a87f52ca406bad895a2b0ffa10e4b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/9f848c9f544a87f52ca406bad895a2b0ffa10e4b/tokio/src/runtime/io/driver.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:8 | }
fn release_pending_registrations(&self) {
if self.registrations.needs_release() {
self.registrations.release(&mut self.synced.lock());
}
}
}
impl fmt::Debug for Handle {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Handle")
}
}
impl Direc... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 9f848c9f544a87f52ca406bad895a2b0ffa10e4b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/9f848c9f544a87f52ca406bad895a2b0ffa10e4b/tokio/src/runtime/io/driver.rs | 281 | 303 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:1 | // Signal handling
cfg_signal_internal_and_unix! {
mod signal;
}
cfg_tokio_uring! {
mod uring;
use uring::UringContext;
}
use crate::io::interest::Interest;
use crate::io::ready::Ready;
use crate::loom::sync::Mutex;
use crate::runtime::driver;
use crate::runtime::io::registration_set;
use crate::runtime::i... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 327bec2caf92af5e2732f8fdfe2e4a20d349f67e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/327bec2caf92af5e2732f8fdfe2e4a20d349f67e/tokio/src/runtime/io/driver.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:2 | registrations: RegistrationSet,
/// State that should be synchronized
synced: Mutex<registration_set::Synced>,
/// Used to wake up the reactor from a call to `turn`.
/// Not supported on `Wasi` due to lack of threading support.
#[cfg(not(target_os = "wasi"))]
waker: mio::Waker,
pub(crate)... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 327bec2caf92af5e2732f8fdfe2e4a20d349f67e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/327bec2caf92af5e2732f8fdfe2e4a20d349f67e/tokio/src/runtime/io/driver.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:3 | pub(super) enum Tick {
Set,
Clear(u8),
}
const TOKEN_WAKEUP: mio::Token = mio::Token(0);
const TOKEN_SIGNAL: mio::Token = mio::Token(1);
fn _assert_kinds() {
fn _assert<T: Send + Sync>() {}
_assert::<Handle>();
}
// ===== impl Driver =====
impl Driver {
/// Creates a new event loop, returning a... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 327bec2caf92af5e2732f8fdfe2e4a20d349f67e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/327bec2caf92af5e2732f8fdfe2e4a20d349f67e/tokio/src/runtime/io/driver.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:4 | metrics: IoDriverMetrics::default(),
#[cfg(all(tokio_uring, feature = "rt", feature = "fs", target_os = "linux",))]
uring_context: Mutex::new(UringContext::new()),
};
#[cfg(all(tokio_uring, feature = "rt", feature = "fs", target_os = "linux",))]
{
handle.add_... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 327bec2caf92af5e2732f8fdfe2e4a20d349f67e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/327bec2caf92af5e2732f8fdfe2e4a20d349f67e/tokio/src/runtime/io/driver.rs | 121 | 180 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:5 | // Block waiting for an event to happen, peeling out how many events
// happened.
match self.poll.poll(events, max_wait) {
Ok(()) => {}
Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
#[cfg(target_os = "wasi")]
Err(e) if e.kind() == io::ErrorKin... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 327bec2caf92af5e2732f8fdfe2e4a20d349f67e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/327bec2caf92af5e2732f8fdfe2e4a20d349f67e/tokio/src/runtime/io/driver.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:6 | {
let mut guard = handle.get_uring().lock();
let ctx = &mut *guard;
ctx.dispatch_completions();
}
handle.metrics.incr_ready_count_by(ready_count);
}
}
impl fmt::Debug for Driver {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 327bec2caf92af5e2732f8fdfe2e4a20d349f67e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/327bec2caf92af5e2732f8fdfe2e4a20d349f67e/tokio/src/runtime/io/driver.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:7 | let token = scheduled_io.token();
// we should remove the `scheduled_io` from the `registrations` set if registering
// the `source` with the OS fails. Otherwise it will leak the `scheduled_io`.
if let Err(e) = self.registry.register(source, token, interest.to_mio()) {
// safety: `s... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 327bec2caf92af5e2732f8fdfe2e4a20d349f67e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/327bec2caf92af5e2732f8fdfe2e4a20d349f67e/tokio/src/runtime/io/driver.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:8 | fn release_pending_registrations(&self) {
if self.registrations.needs_release() {
self.registrations.release(&mut self.synced.lock());
}
}
}
impl fmt::Debug for Handle {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Handle")
}
}
impl Direction {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 327bec2caf92af5e2732f8fdfe2e4a20d349f67e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/327bec2caf92af5e2732f8fdfe2e4a20d349f67e/tokio/src/runtime/io/driver.rs | 281 | 302 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:1 | // Signal handling
cfg_signal_internal_and_unix! {
mod signal;
}
use crate::io::interest::Interest;
use crate::io::ready::Ready;
use crate::loom::sync::Mutex;
use crate::runtime::driver;
use crate::runtime::io::registration_set;
use crate::runtime::io::{IoDriverMetrics, RegistrationSet, ScheduledIo};
use mio::eve... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | d4178cf34924d14fca4ecf551c97b8953376f25a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d4178cf34924d14fca4ecf551c97b8953376f25a/tokio/src/runtime/io/driver.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:2 | /// Used to wake up the reactor from a call to `turn`.
/// Not supported on `Wasi` due to lack of threading support.
#[cfg(not(target_os = "wasi"))]
waker: mio::Waker,
pub(crate) metrics: IoDriverMetrics,
}
#[derive(Debug)]
pub(crate) struct ReadyEvent {
pub(super) tick: u8,
pub(crate) ready: ... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | d4178cf34924d14fca4ecf551c97b8953376f25a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d4178cf34924d14fca4ecf551c97b8953376f25a/tokio/src/runtime/io/driver.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:3 | const TOKEN_SIGNAL: mio::Token = mio::Token(1);
fn _assert_kinds() {
fn _assert<T: Send + Sync>() {}
_assert::<Handle>();
}
// ===== impl Driver =====
impl Driver {
/// Creates a new event loop, returning any error that happened during the
/// creation.
pub(crate) fn new(nevents: usize) -> io::R... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | d4178cf34924d14fca4ecf551c97b8953376f25a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d4178cf34924d14fca4ecf551c97b8953376f25a/tokio/src/runtime/io/driver.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:5 | let mut ready_count = 0;
for event in events.iter() {
let token = event.token();
if token == TOKEN_WAKEUP {
// Nothing to do, the event is used to unblock the I/O driver
} else if token == TOKEN_SIGNAL {
self.signal_ready = true;
}... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | d4178cf34924d14fca4ecf551c97b8953376f25a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d4178cf34924d14fca4ecf551c97b8953376f25a/tokio/src/runtime/io/driver.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:6 | /// needs to otherwise be sent to the main reactor. If the reactor is
/// currently blocked inside of `turn` then it will wake up and soon return
/// after this method has been called. If the reactor is not currently
/// blocked in `turn`, then the next call to `turn` will not block and
/// return immed... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | d4178cf34924d14fca4ecf551c97b8953376f25a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d4178cf34924d14fca4ecf551c97b8953376f25a/tokio/src/runtime/io/driver.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:7 | pub(super) fn deregister_source(
&self,
registration: &Arc<ScheduledIo>,
source: &mut impl Source,
) -> io::Result<()> {
// Deregister the source with the OS poller **first**
self.registry.deregister(source)?;
if self
.registrations
.deregiste... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | d4178cf34924d14fca4ecf551c97b8953376f25a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d4178cf34924d14fca4ecf551c97b8953376f25a/tokio/src/runtime/io/driver.rs | 241 | 281 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:4 | let handle = rt_handle.io();
self.turn(handle, None);
}
pub(crate) fn park_timeout(&mut self, rt_handle: &driver::Handle, duration: Duration) {
let handle = rt_handle.io();
self.turn(handle, Some(duration));
}
pub(crate) fn shutdown(&mut self, rt_handle: &driver::Handle) {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 21cf5a546916b612931d764b3ce2bb7d4412021e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/21cf5a546916b612931d764b3ce2bb7d4412021e/tokio/src/runtime/io/driver.rs | 121 | 180 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:4 | let handle = rt_handle.io();
self.turn(handle, None);
}
pub(crate) fn park_timeout(&mut self, rt_handle: &driver::Handle, duration: Duration) {
let handle = rt_handle.io();
self.turn(handle, Some(duration));
}
pub(crate) fn shutdown(&mut self, rt_handle: &driver::Handle) {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | b32826bc937a34e4d871c89bb2c3711ed3e20cdc | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b32826bc937a34e4d871c89bb2c3711ed3e20cdc/tokio/src/runtime/io/driver.rs | 121 | 180 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:5 | let mut ready_count = 0;
for event in events.iter() {
let token = event.token();
if token == TOKEN_WAKEUP {
// Nothing to do, the event is used to unblock the I/O driver
} else if token == TOKEN_SIGNAL {
self.signal_ready = true;
}... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | b32826bc937a34e4d871c89bb2c3711ed3e20cdc | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b32826bc937a34e4d871c89bb2c3711ed3e20cdc/tokio/src/runtime/io/driver.rs | 161 | 220 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:6 | /// This method is intended to be used in situations where a notification
/// needs to otherwise be sent to the main reactor. If the reactor is
/// currently blocked inside of `turn` then it will wake up and soon return
/// after this method has been called. If the reactor is not currently
/// blocked i... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | b32826bc937a34e4d871c89bb2c3711ed3e20cdc | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b32826bc937a34e4d871c89bb2c3711ed3e20cdc/tokio/src/runtime/io/driver.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:7 | /// Deregisters an I/O resource from the reactor.
pub(super) fn deregister_source(
&self,
registration: &Arc<ScheduledIo>,
source: &mut impl Source,
) -> io::Result<()> {
// Deregister the source with the OS poller **first**
self.registry.deregister(source)?;
if ... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | b32826bc937a34e4d871c89bb2c3711ed3e20cdc | github | async-runtime | https://github.com/tokio-rs/tokio/blob/b32826bc937a34e4d871c89bb2c3711ed3e20cdc/tokio/src/runtime/io/driver.rs | 241 | 282 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:6 | /// This method is intended to be used in situations where a notification
/// needs to otherwise be sent to the main reactor. If the reactor is
/// currently blocked inside of `turn` then it will wake up and soon return
/// after this method has been called. If the reactor is not currently
/// blocked i... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 131e7b4e49c8849298ba54b4e0c99f4b81d869e3 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/131e7b4e49c8849298ba54b4e0c99f4b81d869e3/tokio/src/runtime/io/driver.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:7 | if self
.registrations
.deregister(&mut self.synced.lock(), registration)
{
self.unpark();
}
self.metrics.dec_fd_count();
Ok(())
}
fn release_pending_registrations(&self) {
if self.registrations.needs_release() {
self.reg... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 131e7b4e49c8849298ba54b4e0c99f4b81d869e3 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/131e7b4e49c8849298ba54b4e0c99f4b81d869e3/tokio/src/runtime/io/driver.rs | 241 | 273 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:1 | // Signal handling
cfg_signal_internal_and_unix! {
mod signal;
}
use crate::io::interest::Interest;
use crate::io::ready::Ready;
use crate::loom::sync::Mutex;
use crate::runtime::driver;
use crate::runtime::io::registration_set;
use crate::runtime::io::{IoDriverMetrics, RegistrationSet, ScheduledIo};
use mio::eve... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 30b2eb17c8172620a9e6d90d8be46e294594a5cc | github | async-runtime | https://github.com/tokio-rs/tokio/blob/30b2eb17c8172620a9e6d90d8be46e294594a5cc/tokio/src/runtime/io/driver.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:2 | /// Used to wake up the reactor from a call to `turn`.
/// Not supported on Wasi due to lack of threading support.
#[cfg(not(target_os = "wasi"))]
waker: mio::Waker,
pub(crate) metrics: IoDriverMetrics,
}
#[derive(Debug)]
pub(crate) struct ReadyEvent {
pub(super) tick: u8,
pub(crate) ready: Re... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 30b2eb17c8172620a9e6d90d8be46e294594a5cc | github | async-runtime | https://github.com/tokio-rs/tokio/blob/30b2eb17c8172620a9e6d90d8be46e294594a5cc/tokio/src/runtime/io/driver.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/runtime/io/driver.rs:1 | // Signal handling
cfg_signal_internal_and_unix! {
mod signal;
}
use crate::io::interest::Interest;
use crate::io::ready::Ready;
use crate::loom::sync::Mutex;
use crate::runtime::driver;
use crate::runtime::io::registration_set;
use crate::runtime::io::{IoDriverMetrics, RegistrationSet, ScheduledIo};
use mio::eve... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/runtime/io/driver.rs | MIT | 6871084629ad95c37c7136d865890ab2e371ea12 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/6871084629ad95c37c7136d865890ab2e371ea12/tokio/src/runtime/io/driver.rs | 1 | 60 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.