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:10
{ let id = crate::runtime::task::Id::next(); #[cfg(all( tokio_unstable, tokio_taskdump, feature = "rt", target_os = "linux", any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64") ))] let future = super::task:...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
77de684ed94a2ac15504c0033f4c8fe39693f3b9
github
async-runtime
https://github.com/tokio-rs/tokio/blob/77de684ed94a2ac15504c0033f4c8fe39693f3b9/tokio/src/runtime/handle.rs
361
420
tokio-rs/tokio:tokio/src/runtime/handle.rs:11
scheduler::Handle::MultiThread(_) => RuntimeFlavor::MultiThread, #[cfg(all(tokio_unstable, feature = "rt-multi-thread"))] scheduler::Handle::MultiThreadAlt(_) => RuntimeFlavor::MultiThreadAlt, } } cfg_unstable! { /// Returns the [`Id`] of the current `Runtime`. /...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
77de684ed94a2ac15504c0033f4c8fe39693f3b9
github
async-runtime
https://github.com/tokio-rs/tokio/blob/77de684ed94a2ac15504c0033f4c8fe39693f3b9/tokio/src/runtime/handle.rs
401
460
tokio-rs/tokio:tokio/src/runtime/handle.rs:15
/// Tasks managed by local executors (e.g., `FuturesUnordered` and /// [`LocalSet`][crate::task::LocalSet]) may not appear in task dumps. /// /// ## Non-Termination When Workers Are Blocked /// /// The future produced by `Handle::dump` may never produce `Ready` if /// ano...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
77de684ed94a2ac15504c0033f4c8fe39693f3b9
github
async-runtime
https://github.com/tokio-rs/tokio/blob/77de684ed94a2ac15504c0033f4c8fe39693f3b9/tokio/src/runtime/handle.rs
561
620
tokio-rs/tokio:tokio/src/runtime/handle.rs:16
async fn spawn_thread<F>(f: F) -> <F as Future>::Output where F: Future + Send + 'static, <F as Future>::Output: Send + 'static { let (tx, rx) = crate::sync::oneshot::channel(); crate::loom::thread::spawn(|| { let rt = crate::runtime::Build...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
77de684ed94a2ac15504c0033f4c8fe39693f3b9
github
async-runtime
https://github.com/tokio-rs/tokio/blob/77de684ed94a2ac15504c0033f4c8fe39693f3b9/tokio/src/runtime/handle.rs
601
660
tokio-rs/tokio:tokio/src/runtime/handle.rs:17
} /// Returns true if the call failed because the Tokio context thread-local /// had been destroyed. This can usually only happen if in the destructor of /// other thread-locals. pub fn is_thread_local_destroyed(&self) -> bool { matches!(self.kind, TryCurrentErrorKind::ThreadLocalDestroyed) ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
77de684ed94a2ac15504c0033f4c8fe39693f3b9
github
async-runtime
https://github.com/tokio-rs/tokio/blob/77de684ed94a2ac15504c0033f4c8fe39693f3b9/tokio/src/runtime/handle.rs
641
675
tokio-rs/tokio:tokio/src/runtime/handle.rs:11
scheduler::Handle::MultiThread(_) => RuntimeFlavor::MultiThread, #[cfg(all(tokio_unstable, feature = "rt-multi-thread"))] scheduler::Handle::MultiThreadAlt(_) => RuntimeFlavor::MultiThreadAlt, } } cfg_unstable! { /// Returns the [`Id`] of the current `Runtime`. /...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
2671ffb55b8f2464c0f1c3c7d99ee70118108755
github
async-runtime
https://github.com/tokio-rs/tokio/blob/2671ffb55b8f2464c0f1c3c7d99ee70118108755/tokio/src/runtime/handle.rs
401
460
tokio-rs/tokio:tokio/src/runtime/handle.rs:15
/// /// The future produced by `Handle::dump` may never produce `Ready` if /// another runtime worker is blocked for more than 250ms. This may /// occur if a dump is requested during shutdown, or if another runtime /// worker is infinite looping or synchronously deadlocked. For these ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
2671ffb55b8f2464c0f1c3c7d99ee70118108755
github
async-runtime
https://github.com/tokio-rs/tokio/blob/2671ffb55b8f2464c0f1c3c7d99ee70118108755/tokio/src/runtime/handle.rs
561
620
tokio-rs/tokio:tokio/src/runtime/handle.rs:11
scheduler::Handle::MultiThread(_) => RuntimeFlavor::MultiThread, #[cfg(all(tokio_unstable, feature = "rt-multi-thread"))] scheduler::Handle::MultiThreadAlt(_) => RuntimeFlavor::MultiThreadAlt, } } cfg_unstable! { /// Returns the [`Id`] of the current `Runtime`. /...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
512e9decfb683d22f4a145459142542caa0894c9
github
async-runtime
https://github.com/tokio-rs/tokio/blob/512e9decfb683d22f4a145459142542caa0894c9/tokio/src/runtime/handle.rs
401
460
tokio-rs/tokio:tokio/src/runtime/handle.rs:15
/// occur if a dump is requested during shutdown, or if another runtime /// worker is infinite looping or synchronously deadlocked. For these /// reasons, task dumping should usually be paired with an explicit /// [timeout][crate::time::timeout]. pub async fn dump(&self) -> crate::runtim...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
512e9decfb683d22f4a145459142542caa0894c9
github
async-runtime
https://github.com/tokio-rs/tokio/blob/512e9decfb683d22f4a145459142542caa0894c9/tokio/src/runtime/handle.rs
561
620
tokio-rs/tokio:tokio/src/runtime/handle.rs:16
let rt = crate::runtime::Builder::new_current_thread().build().unwrap(); rt.block_on(async { let _ = tx.send(f.await); }); }); rx.await.unwrap() } } } /// Error returned by `try_current` when no Runtime has been started #[derive(De...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
512e9decfb683d22f4a145459142542caa0894c9
github
async-runtime
https://github.com/tokio-rs/tokio/blob/512e9decfb683d22f4a145459142542caa0894c9/tokio/src/runtime/handle.rs
601
660
tokio-rs/tokio:tokio/src/runtime/handle.rs:17
} } enum TryCurrentErrorKind { NoContext, ThreadLocalDestroyed, } impl fmt::Debug for TryCurrentErrorKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { TryCurrentErrorKind::NoContext => f.write_str("NoContext"), TryCurrentErrorKind::ThreadLocalDe...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
512e9decfb683d22f4a145459142542caa0894c9
github
async-runtime
https://github.com/tokio-rs/tokio/blob/512e9decfb683d22f4a145459142542caa0894c9/tokio/src/runtime/handle.rs
641
668
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
let future = crate::util::trace::task(future, "block_on", _meta, super::task::Id::next().as_u64()); // Enter the runtime context. This sets the current driver handles and // prevents blocking an existing runtime. context::enter_runtime(&self.inner, true, |blocking| { blo...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
c3a935541d911cd9afa6838a1bb02e4f499b244d
github
async-runtime
https://github.com/tokio-rs/tokio/blob/c3a935541d911cd9afa6838a1bb02e4f499b244d/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
/// } /// ``` /// /// ``` /// use tokio::runtime::{Handle, RuntimeFlavor}; /// /// #[tokio::main(flavor = "multi_thread", worker_threads = 4)] /// async fn main() { /// assert_eq!(RuntimeFlavor::MultiThread, Handle::current().runtime_flavor()); /// } /// ``` pub fn runtime_...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
c3a935541d911cd9afa6838a1bb02e4f499b244d
github
async-runtime
https://github.com/tokio-rs/tokio/blob/c3a935541d911cd9afa6838a1bb02e4f499b244d/tokio/src/runtime/handle.rs
361
420
tokio-rs/tokio:tokio/src/runtime/handle.rs:11
/// [`Id`]: struct@crate::runtime::Id pub fn id(&self) -> runtime::Id { let owned_id = match &self.inner { scheduler::Handle::CurrentThread(handle) => handle.owned_id(), #[cfg(feature = "rt-multi-thread")] scheduler::Handle::MultiThread(handle) => hand...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
c3a935541d911cd9afa6838a1bb02e4f499b244d
github
async-runtime
https://github.com/tokio-rs/tokio/blob/c3a935541d911cd9afa6838a1bb02e4f499b244d/tokio/src/runtime/handle.rs
401
460
tokio-rs/tokio:tokio/src/runtime/handle.rs:14
/// Although enabling the `tokio_taskdump` feature imposes virtually no /// additional runtime overhead, actually calling `Handle::dump` is /// expensive. The runtime must synchronize and pause its workers, then /// re-poll every task in a special tracing mode. Avoid requesting dumps ///...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
c3a935541d911cd9afa6838a1bb02e4f499b244d
github
async-runtime
https://github.com/tokio-rs/tokio/blob/c3a935541d911cd9afa6838a1bb02e4f499b244d/tokio/src/runtime/handle.rs
521
580
tokio-rs/tokio:tokio/src/runtime/handle.rs:15
#[doc(hidden)] pub fn is_tracing() -> bool { super::task::trace::Context::is_tracing() } } cfg_rt_multi_thread! { /// Spawn a new thread and asynchronously await on its result. async fn spawn_thread<F>(f: F) -> <F as Future>::Output where F: Futur...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
c3a935541d911cd9afa6838a1bb02e4f499b244d
github
async-runtime
https://github.com/tokio-rs/tokio/blob/c3a935541d911cd9afa6838a1bb02e4f499b244d/tokio/src/runtime/handle.rs
561
620
tokio-rs/tokio:tokio/src/runtime/handle.rs:16
kind: TryCurrentErrorKind::ThreadLocalDestroyed, } } /// Returns true if the call failed because there is currently no runtime in /// the Tokio context. pub fn is_missing_context(&self) -> bool { matches!(self.kind, TryCurrentErrorKind::NoContext) } /// Returns true if the call...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
c3a935541d911cd9afa6838a1bb02e4f499b244d
github
async-runtime
https://github.com/tokio-rs/tokio/blob/c3a935541d911cd9afa6838a1bb02e4f499b244d/tokio/src/runtime/handle.rs
601
643
tokio-rs/tokio:tokio/src/runtime/handle.rs:1
#[cfg(tokio_unstable)] use crate::runtime; use crate::runtime::{context, scheduler, RuntimeFlavor, RuntimeMetrics}; /// 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`]: cra...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
b5de84d19b4316caccfe13aa7552d895bdd7f046
github
async-runtime
https://github.com/tokio-rs/tokio/blob/b5de84d19b4316caccfe13aa7552d895bdd7f046/tokio/src/runtime/handle.rs
1
60
tokio-rs/tokio:tokio/src/runtime/handle.rs:5
/// The provided future will start running in the background immediately /// when `spawn` is called, even if you don't await the returned /// `JoinHandle`. /// /// 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
b5de84d19b4316caccfe13aa7552d895bdd7f046
github
async-runtime
https://github.com/tokio-rs/tokio/blob/b5de84d19b4316caccfe13aa7552d895bdd7f046/tokio/src/runtime/handle.rs
161
220
tokio-rs/tokio:tokio/src/runtime/handle.rs:8
/// handle.block_on(async { /// println!("hello"); /// }); /// }); /// } /// ``` /// /// [`JoinError`]: struct@crate::task::JoinError /// [`JoinHandle`]: struct@crate::task::JoinHandle /// [`Runtime::block_on`]: fn@crate::runtime::Runtime::block_on ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
b5de84d19b4316caccfe13aa7552d895bdd7f046
github
async-runtime
https://github.com/tokio-rs/tokio/blob/b5de84d19b4316caccfe13aa7552d895bdd7f046/tokio/src/runtime/handle.rs
281
340
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
// Enter the runtime context. This sets the current driver handles and // prevents blocking an existing runtime. context::enter_runtime(&self.inner, true, |blocking| { blocking.block_on(future).expect("failed to park thread") }) } #[track_caller] pub(crate) fn spawn_name...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
b5de84d19b4316caccfe13aa7552d895bdd7f046
github
async-runtime
https://github.com/tokio-rs/tokio/blob/b5de84d19b4316caccfe13aa7552d895bdd7f046/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
/// ``` /// use tokio::runtime::{Handle, RuntimeFlavor}; /// /// #[tokio::main(flavor = "multi_thread", worker_threads = 4)] /// async fn main() { /// assert_eq!(RuntimeFlavor::MultiThread, Handle::current().runtime_flavor()); /// } /// ``` pub fn runtime_flavor(&self) -> RuntimeFlavor...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
b5de84d19b4316caccfe13aa7552d895bdd7f046
github
async-runtime
https://github.com/tokio-rs/tokio/blob/b5de84d19b4316caccfe13aa7552d895bdd7f046/tokio/src/runtime/handle.rs
361
420
tokio-rs/tokio:tokio/src/runtime/handle.rs:11
scheduler::Handle::CurrentThread(handle) => handle.owned_id(), #[cfg(feature = "rt-multi-thread")] scheduler::Handle::MultiThread(handle) => handle.owned_id(), #[cfg(all(tokio_unstable, feature = "rt-multi-thread"))] scheduler::Handle::MultiThreadAlt(handl...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
b5de84d19b4316caccfe13aa7552d895bdd7f046
github
async-runtime
https://github.com/tokio-rs/tokio/blob/b5de84d19b4316caccfe13aa7552d895bdd7f046/tokio/src/runtime/handle.rs
401
460
tokio-rs/tokio:tokio/src/runtime/handle.rs:14
/// re-poll every task in a special tracing mode. Avoid requesting dumps /// often. /// /// ## Local Executors /// /// Tasks managed by local executors (e.g., `FuturesUnordered` and /// [`LocalSet`][crate::task::LocalSet]) may not appear in task dumps. /// ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
b5de84d19b4316caccfe13aa7552d895bdd7f046
github
async-runtime
https://github.com/tokio-rs/tokio/blob/b5de84d19b4316caccfe13aa7552d895bdd7f046/tokio/src/runtime/handle.rs
521
580
tokio-rs/tokio:tokio/src/runtime/handle.rs:15
} } cfg_rt_multi_thread! { /// Spawn a new thread and asynchronously await on its result. async fn spawn_thread<F>(f: F) -> <F as Future>::Output where F: Future + Send + 'static, <F as Future>::Output: Send + 'static { let (tx, rx) = crate::s...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
b5de84d19b4316caccfe13aa7552d895bdd7f046
github
async-runtime
https://github.com/tokio-rs/tokio/blob/b5de84d19b4316caccfe13aa7552d895bdd7f046/tokio/src/runtime/handle.rs
561
620
tokio-rs/tokio:tokio/src/runtime/handle.rs:16
/// Returns true if the call failed because there is currently no runtime in /// the Tokio context. pub fn is_missing_context(&self) -> bool { matches!(self.kind, TryCurrentErrorKind::NoContext) } /// Returns true if the call failed because the Tokio context thread-local /// had been destro...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
b5de84d19b4316caccfe13aa7552d895bdd7f046
github
async-runtime
https://github.com/tokio-rs/tokio/blob/b5de84d19b4316caccfe13aa7552d895bdd7f046/tokio/src/runtime/handle.rs
601
640
tokio-rs/tokio:tokio/src/runtime/handle.rs:5
/// The provided future will start running in the background immediately /// when `spawn` is called, even if you don't await the returned /// `JoinHandle`. /// /// 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
da17c6146413d9ea14f76989efe31ef7de829f4c
github
async-runtime
https://github.com/tokio-rs/tokio/blob/da17c6146413d9ea14f76989efe31ef7de829f4c/tokio/src/runtime/handle.rs
161
220
tokio-rs/tokio:tokio/src/runtime/handle.rs:8
/// handle.block_on(async { /// println!("hello"); /// }); /// }); /// } /// ``` /// /// [`JoinError`]: struct@crate::task::JoinError /// [`JoinHandle`]: struct@crate::task::JoinHandle /// [`Runtime::block_on`]: fn@crate::runtime::Runtime::block_on ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
da17c6146413d9ea14f76989efe31ef7de829f4c
github
async-runtime
https://github.com/tokio-rs/tokio/blob/da17c6146413d9ea14f76989efe31ef7de829f4c/tokio/src/runtime/handle.rs
281
340
tokio-rs/tokio:tokio/src/runtime/handle.rs:1
#[cfg(tokio_unstable)] use crate::runtime; use crate::runtime::{context, scheduler, RuntimeFlavor, RuntimeMetrics}; /// 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`]: cra...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
86658bd87dc470f8e36eb6b893cc403820cfb7ee
github
async-runtime
https://github.com/tokio-rs/tokio/blob/86658bd87dc470f8e36eb6b893cc403820cfb7ee/tokio/src/runtime/handle.rs
1
60
tokio-rs/tokio:tokio/src/runtime/handle.rs:3
/// [`tokio::spawn`]: fn@crate::spawn pub fn enter(&self) -> EnterGuard<'_> { EnterGuard { _guard: match context::try_set_current(&self.inner) { Some(guard) => guard, None => panic!("{}", crate::util::error::THREAD_LOCAL_DESTROYED_ERROR), }, ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
86658bd87dc470f8e36eb6b893cc403820cfb7ee
github
async-runtime
https://github.com/tokio-rs/tokio/blob/86658bd87dc470f8e36eb6b893cc403820cfb7ee/tokio/src/runtime/handle.rs
81
140
tokio-rs/tokio:tokio/src/runtime/handle.rs:5
/// when `spawn` is called, even if you don't await the returned /// `JoinHandle`. /// /// See [module level][mod] documentation for more details. /// /// [mod]: index.html /// /// # Examples /// /// ``` /// use tokio::runtime::Runtime; /// /// # fn dox() { /// // Cre...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
86658bd87dc470f8e36eb6b893cc403820cfb7ee
github
async-runtime
https://github.com/tokio-rs/tokio/blob/86658bd87dc470f8e36eb6b893cc403820cfb7ee/tokio/src/runtime/handle.rs
161
220
tokio-rs/tokio:tokio/src/runtime/handle.rs:8
/// ``` /// /// [`JoinError`]: struct@crate::task::JoinError /// [`JoinHandle`]: struct@crate::task::JoinHandle /// [`Runtime::block_on`]: fn@crate::runtime::Runtime::block_on /// [`Runtime::shutdown_background`]: fn@crate::runtime::Runtime::shutdown_background /// [`Runtime::shutdown_timeout`]:...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
86658bd87dc470f8e36eb6b893cc403820cfb7ee
github
async-runtime
https://github.com/tokio-rs/tokio/blob/86658bd87dc470f8e36eb6b893cc403820cfb7ee/tokio/src/runtime/handle.rs
281
340
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
#[cfg(all( tokio_unstable, tokio_taskdump, feature = "rt", target_os = "linux", any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64") ))] let future = super::task::trace::Trace::root(future); #[cfg(all(tokio_unstable...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
86658bd87dc470f8e36eb6b893cc403820cfb7ee
github
async-runtime
https://github.com/tokio-rs/tokio/blob/86658bd87dc470f8e36eb6b893cc403820cfb7ee/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
scheduler::Handle::MultiThreadAlt(_) => RuntimeFlavor::MultiThreadAlt, } } cfg_unstable! { /// Returns the [`Id`] of the current `Runtime`. /// /// # Examples /// /// ``` /// use tokio::runtime::Handle; /// /// #[tokio::main(flavor = "curr...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
86658bd87dc470f8e36eb6b893cc403820cfb7ee
github
async-runtime
https://github.com/tokio-rs/tokio/blob/86658bd87dc470f8e36eb6b893cc403820cfb7ee/tokio/src/runtime/handle.rs
361
420
tokio-rs/tokio:tokio/src/runtime/handle.rs:13
/// `.cargo/config.toml`: /// ```text /// [build] /// rustflags = ["--cfg", "tokio_unstable", "--cfg", "tokio_taskdump"] /// ``` /// /// [cargo-config]: /// https://doc.rust-lang.org/cargo/reference/config.html /// /// ## Platform Requirements ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
86658bd87dc470f8e36eb6b893cc403820cfb7ee
github
async-runtime
https://github.com/tokio-rs/tokio/blob/86658bd87dc470f8e36eb6b893cc403820cfb7ee/tokio/src/runtime/handle.rs
481
540
tokio-rs/tokio:tokio/src/runtime/handle.rs:14
/// reasons, task dumping should usually be paired with an explicit /// [timeout][crate::time::timeout]. pub async fn dump(&self) -> crate::runtime::Dump { match &self.inner { scheduler::Handle::CurrentThread(handle) => handle.dump(), #[cfg(all(feature = "rt-m...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
86658bd87dc470f8e36eb6b893cc403820cfb7ee
github
async-runtime
https://github.com/tokio-rs/tokio/blob/86658bd87dc470f8e36eb6b893cc403820cfb7ee/tokio/src/runtime/handle.rs
521
580
tokio-rs/tokio:tokio/src/runtime/handle.rs:15
let _ = tx.send(f.await); }); }); rx.await.unwrap() } } } /// Error returned by `try_current` when no Runtime has been started #[derive(Debug)] pub struct TryCurrentError { kind: TryCurrentErrorKind, } impl TryCurrentError { pub(crate) fn new_no_context() ->...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
86658bd87dc470f8e36eb6b893cc403820cfb7ee
github
async-runtime
https://github.com/tokio-rs/tokio/blob/86658bd87dc470f8e36eb6b893cc403820cfb7ee/tokio/src/runtime/handle.rs
561
620
tokio-rs/tokio:tokio/src/runtime/handle.rs:16
enum TryCurrentErrorKind { NoContext, ThreadLocalDestroyed, } impl fmt::Debug for TryCurrentErrorKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { TryCurrentErrorKind::NoContext => f.write_str("NoContext"), TryCurrentErrorKind::ThreadLocalDestroy...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
86658bd87dc470f8e36eb6b893cc403820cfb7ee
github
async-runtime
https://github.com/tokio-rs/tokio/blob/86658bd87dc470f8e36eb6b893cc403820cfb7ee/tokio/src/runtime/handle.rs
601
626
tokio-rs/tokio:tokio/src/runtime/handle.rs:1
#[cfg(tokio_unstable)] use crate::runtime; use crate::runtime::{context, scheduler, RuntimeFlavor}; /// 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::Run...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
9ed595767d01c400955122d276b34ab52b3a6aab
github
async-runtime
https://github.com/tokio-rs/tokio/blob/9ed595767d01c400955122d276b34ab52b3a6aab/tokio/src/runtime/handle.rs
1
60
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
scheduler::Handle::MultiThreadAlt(_) => RuntimeFlavor::MultiThreadAlt, } } cfg_unstable! { /// Returns the [`Id`] of the current `Runtime`. /// /// # Examples /// /// ``` /// use tokio::runtime::Handle; /// /// #[tokio::main(flavor = "curr...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
9ed595767d01c400955122d276b34ab52b3a6aab
github
async-runtime
https://github.com/tokio-rs/tokio/blob/9ed595767d01c400955122d276b34ab52b3a6aab/tokio/src/runtime/handle.rs
361
420
tokio-rs/tokio:tokio/src/runtime/handle.rs:14
/// ## Non-Termination When Workers Are Blocked /// /// The future produced by `Handle::dump` may never produce `Ready` if /// another runtime worker is blocked for more than 250ms. This may /// occur if a dump is requested during shutdown, or if another runtime /// worker is inf...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
9ed595767d01c400955122d276b34ab52b3a6aab
github
async-runtime
https://github.com/tokio-rs/tokio/blob/9ed595767d01c400955122d276b34ab52b3a6aab/tokio/src/runtime/handle.rs
521
580
tokio-rs/tokio:tokio/src/runtime/handle.rs:15
<F as Future>::Output: Send + 'static { let (tx, rx) = crate::sync::oneshot::channel(); crate::loom::thread::spawn(|| { let rt = crate::runtime::Builder::new_current_thread().build().unwrap(); rt.block_on(async { let _ = tx.send(f.await...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
9ed595767d01c400955122d276b34ab52b3a6aab
github
async-runtime
https://github.com/tokio-rs/tokio/blob/9ed595767d01c400955122d276b34ab52b3a6aab/tokio/src/runtime/handle.rs
561
620
tokio-rs/tokio:tokio/src/runtime/handle.rs:16
/// had been destroyed. This can usually only happen if in the destructor of /// other thread-locals. pub fn is_thread_local_destroyed(&self) -> bool { matches!(self.kind, TryCurrentErrorKind::ThreadLocalDestroyed) } } enum TryCurrentErrorKind { NoContext, ThreadLocalDestroyed, } impl fmt:...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
9ed595767d01c400955122d276b34ab52b3a6aab
github
async-runtime
https://github.com/tokio-rs/tokio/blob/9ed595767d01c400955122d276b34ab52b3a6aab/tokio/src/runtime/handle.rs
601
632
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
#[cfg(all( tokio_unstable, tokio_taskdump, feature = "rt", target_os = "linux", any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64") ))] let future = super::task::trace::Trace::root(future); #[cfg(all(tokio_unstable...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
131e7b4e49c8849298ba54b4e0c99f4b81d869e3
github
async-runtime
https://github.com/tokio-rs/tokio/blob/131e7b4e49c8849298ba54b4e0c99f4b81d869e3/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
scheduler::Handle::MultiThreadAlt(_) => RuntimeFlavor::MultiThreadAlt, } } cfg_unstable! { /// Returns the [`Id`] of the current `Runtime`. /// /// # Examples /// /// ``` /// use tokio::runtime::Handle; /// /// #[tokio::main(flavor = "curr...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
131e7b4e49c8849298ba54b4e0c99f4b81d869e3
github
async-runtime
https://github.com/tokio-rs/tokio/blob/131e7b4e49c8849298ba54b4e0c99f4b81d869e3/tokio/src/runtime/handle.rs
361
420
tokio-rs/tokio:tokio/src/runtime/handle.rs:14
/// ## Non-Termination When Workers Are Blocked /// /// The future produced by `Handle::dump` may never produce `Ready` if /// another runtime worker is blocked for more than 250ms. This may /// occur if a dump is requested during shutdown, or if another runtime /// worker is inf...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
707fb4d0df72d7ee6a4f4b5a675f84cd1863bc94
github
async-runtime
https://github.com/tokio-rs/tokio/blob/707fb4d0df72d7ee6a4f4b5a675f84cd1863bc94/tokio/src/runtime/handle.rs
521
580
tokio-rs/tokio:tokio/src/runtime/handle.rs:15
}); rx.await.unwrap() } } } /// Error returned by `try_current` when no Runtime has been started #[derive(Debug)] pub struct TryCurrentError { kind: TryCurrentErrorKind, } impl TryCurrentError { pub(crate) fn new_no_context() -> Self { Self { kind: TryCurrentErrorKi...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
707fb4d0df72d7ee6a4f4b5a675f84cd1863bc94
github
async-runtime
https://github.com/tokio-rs/tokio/blob/707fb4d0df72d7ee6a4f4b5a675f84cd1863bc94/tokio/src/runtime/handle.rs
561
620
tokio-rs/tokio:tokio/src/runtime/handle.rs:16
NoContext, ThreadLocalDestroyed, } impl fmt::Debug for TryCurrentErrorKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { TryCurrentErrorKind::NoContext => f.write_str("NoContext"), TryCurrentErrorKind::ThreadLocalDestroyed => f.write_str("ThreadLocalD...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
707fb4d0df72d7ee6a4f4b5a675f84cd1863bc94
github
async-runtime
https://github.com/tokio-rs/tokio/blob/707fb4d0df72d7ee6a4f4b5a675f84cd1863bc94/tokio/src/runtime/handle.rs
601
624
tokio-rs/tokio:tokio/src/runtime/handle.rs:15
}); rx.await.unwrap() } } } /// Error returned by `try_current` when no Runtime has been started #[derive(Debug)] pub struct TryCurrentError { kind: TryCurrentErrorKind, } impl TryCurrentError { pub(crate) fn new_no_context() -> Self { Self { kind: TryCurrentErrorKi...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
c445e467ce4363b3a9b6825268814a9bc27c0127
github
async-runtime
https://github.com/tokio-rs/tokio/blob/c445e467ce4363b3a9b6825268814a9bc27c0127/tokio/src/runtime/handle.rs
561
620
tokio-rs/tokio:tokio/src/runtime/handle.rs:16
NoContext, ThreadLocalDestroyed, } impl fmt::Debug for TryCurrentErrorKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use TryCurrentErrorKind::*; match self { NoContext => f.write_str("NoContext"), ThreadLocalDestroyed => f.write_str("ThreadLocalDestroy...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
c445e467ce4363b3a9b6825268814a9bc27c0127
github
async-runtime
https://github.com/tokio-rs/tokio/blob/c445e467ce4363b3a9b6825268814a9bc27c0127/tokio/src/runtime/handle.rs
601
625
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
#[cfg(all( tokio_unstable, tokio_taskdump, feature = "rt", target_os = "linux", any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64") ))] let future = super::task::trace::Trace::root(future); #[cfg(all(tokio_unstable...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
4165601b1bbaa7c29cbfb319fe75a9adddf4085e
github
async-runtime
https://github.com/tokio-rs/tokio/blob/4165601b1bbaa7c29cbfb319fe75a9adddf4085e/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
scheduler::Handle::MultiThreadAlt(_) => RuntimeFlavor::MultiThreadAlt, } } cfg_unstable! { /// Returns the [`Id`] of the current `Runtime`. /// /// # Examples /// /// ``` /// use tokio::runtime::Handle; /// /// #[tokio::main(flavor = "curr...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
4165601b1bbaa7c29cbfb319fe75a9adddf4085e
github
async-runtime
https://github.com/tokio-rs/tokio/blob/4165601b1bbaa7c29cbfb319fe75a9adddf4085e/tokio/src/runtime/handle.rs
361
420
tokio-rs/tokio:tokio/src/runtime/handle.rs:14
/// ## Non-Termination When Workers Are Blocked /// /// The future produced by `Handle::dump` may never produce `Ready` if /// another runtime worker is blocked for more than 250ms. This may /// occur if a dump is requested during shutdown, or if another runtime /// worker is inf...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
4165601b1bbaa7c29cbfb319fe75a9adddf4085e
github
async-runtime
https://github.com/tokio-rs/tokio/blob/4165601b1bbaa7c29cbfb319fe75a9adddf4085e/tokio/src/runtime/handle.rs
521
580
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
#[cfg(all( tokio_unstable, tokio_taskdump, feature = "rt", target_os = "linux", any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64") ))] let future = super::task::trace::Trace::root(future); #[cfg(all(tokio_unstable...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
63577cd8d3f2b1a1c787870125ab808eaa1eaa99
github
async-runtime
https://github.com/tokio-rs/tokio/blob/63577cd8d3f2b1a1c787870125ab808eaa1eaa99/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
} cfg_unstable! { /// Returns the [`Id`] of the current `Runtime`. /// /// # Examples /// /// ``` /// use tokio::runtime::Handle; /// /// #[tokio::main(flavor = "current_thread")] /// async fn main() { /// println!("Current runtime i...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
63577cd8d3f2b1a1c787870125ab808eaa1eaa99
github
async-runtime
https://github.com/tokio-rs/tokio/blob/63577cd8d3f2b1a1c787870125ab808eaa1eaa99/tokio/src/runtime/handle.rs
361
420
tokio-rs/tokio:tokio/src/runtime/handle.rs:14
/// occur if a dump is requested during shutdown, or if another runtime /// worker is infinite looping or synchronously deadlocked. For these /// reasons, task dumping should usually be paired with an explicit /// [timeout][crate::time::timeout]. pub async fn dump(&self) -> crate::runtim...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
63577cd8d3f2b1a1c787870125ab808eaa1eaa99
github
async-runtime
https://github.com/tokio-rs/tokio/blob/63577cd8d3f2b1a1c787870125ab808eaa1eaa99/tokio/src/runtime/handle.rs
521
580
tokio-rs/tokio:tokio/src/runtime/handle.rs:15
/// Error returned by `try_current` when no Runtime has been started #[derive(Debug)] pub struct TryCurrentError { kind: TryCurrentErrorKind, } impl TryCurrentError { pub(crate) fn new_no_context() -> Self { Self { kind: TryCurrentErrorKind::NoContext, } } pub(crate) fn new...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
63577cd8d3f2b1a1c787870125ab808eaa1eaa99
github
async-runtime
https://github.com/tokio-rs/tokio/blob/63577cd8d3f2b1a1c787870125ab808eaa1eaa99/tokio/src/runtime/handle.rs
561
619
tokio-rs/tokio:tokio/src/runtime/handle.rs:16
use TryCurrentErrorKind::*; match self { NoContext => f.write_str("NoContext"), ThreadLocalDestroyed => f.write_str("ThreadLocalDestroyed"), } } } impl fmt::Display for TryCurrentError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use TryCurrentErr...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
63577cd8d3f2b1a1c787870125ab808eaa1eaa99
github
async-runtime
https://github.com/tokio-rs/tokio/blob/63577cd8d3f2b1a1c787870125ab808eaa1eaa99/tokio/src/runtime/handle.rs
601
619
tokio-rs/tokio:tokio/src/runtime/handle.rs:1
use crate::runtime::{context, scheduler, RuntimeFlavor}; /// 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)] // W...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
56c43655845b109f59a8cdd5d31d36992fc3ecef
github
async-runtime
https://github.com/tokio-rs/tokio/blob/56c43655845b109f59a8cdd5d31d36992fc3ecef/tokio/src/runtime/handle.rs
1
60
tokio-rs/tokio:tokio/src/runtime/handle.rs:3
EnterGuard { _guard: match context::try_set_current(&self.inner) { Some(guard) => guard, None => panic!("{}", crate::util::error::THREAD_LOCAL_DESTROYED_ERROR), }, _handle_lifetime: PhantomData, } } /// Returns a `Handle` view over the...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
56c43655845b109f59a8cdd5d31d36992fc3ecef
github
async-runtime
https://github.com/tokio-rs/tokio/blob/56c43655845b109f59a8cdd5d31d36992fc3ecef/tokio/src/runtime/handle.rs
81
140
tokio-rs/tokio:tokio/src/runtime/handle.rs:5
/// /// See [module level][mod] documentation for more details. /// /// [mod]: index.html /// /// # Examples /// /// ``` /// use tokio::runtime::Runtime; /// /// # fn dox() { /// // Create the runtime /// let rt = Runtime::new().unwrap(); /// // Get a handle from this...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
56c43655845b109f59a8cdd5d31d36992fc3ecef
github
async-runtime
https://github.com/tokio-rs/tokio/blob/56c43655845b109f59a8cdd5d31d36992fc3ecef/tokio/src/runtime/handle.rs
161
220
tokio-rs/tokio:tokio/src/runtime/handle.rs:8
/// [`JoinError`]: struct@crate::task::JoinError /// [`JoinHandle`]: struct@crate::task::JoinHandle /// [`Runtime::block_on`]: fn@crate::runtime::Runtime::block_on /// [`Runtime::shutdown_background`]: fn@crate::runtime::Runtime::shutdown_background /// [`Runtime::shutdown_timeout`]: fn@crate::runtime::...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
56c43655845b109f59a8cdd5d31d36992fc3ecef
github
async-runtime
https://github.com/tokio-rs/tokio/blob/56c43655845b109f59a8cdd5d31d36992fc3ecef/tokio/src/runtime/handle.rs
281
340
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
tokio_taskdump, feature = "rt", target_os = "linux", any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64") ))] let future = super::task::trace::Trace::root(future); #[cfg(all(tokio_unstable, feature = "tracing"))] let future = crate...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
56c43655845b109f59a8cdd5d31d36992fc3ecef
github
async-runtime
https://github.com/tokio-rs/tokio/blob/56c43655845b109f59a8cdd5d31d36992fc3ecef/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:13
/// /// Tasks managed by local executors (e.g., `FuturesUnordered` and /// [`LocalSet`][crate::task::LocalSet]) may not appear in task dumps. /// /// ## Non-Termination When Workers Are Blocked /// /// The future produced by `Handle::dump` may never produce `Ready` if ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
56c43655845b109f59a8cdd5d31d36992fc3ecef
github
async-runtime
https://github.com/tokio-rs/tokio/blob/56c43655845b109f59a8cdd5d31d36992fc3ecef/tokio/src/runtime/handle.rs
481
540
tokio-rs/tokio:tokio/src/runtime/handle.rs:14
let _ = tx.send(f.await); }); }); rx.await.unwrap() } } } /// Error returned by `try_current` when no Runtime has been started #[derive(Debug)] pub struct TryCurrentError { kind: TryCurrentErrorKind, } impl TryCurrentError { pub(crate) fn new_no_context() ->...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
56c43655845b109f59a8cdd5d31d36992fc3ecef
github
async-runtime
https://github.com/tokio-rs/tokio/blob/56c43655845b109f59a8cdd5d31d36992fc3ecef/tokio/src/runtime/handle.rs
521
580
tokio-rs/tokio:tokio/src/runtime/handle.rs:15
enum TryCurrentErrorKind { NoContext, ThreadLocalDestroyed, } impl fmt::Debug for TryCurrentErrorKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use TryCurrentErrorKind::*; match self { NoContext => f.write_str("NoContext"), ThreadLocalDestroyed => ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
56c43655845b109f59a8cdd5d31d36992fc3ecef
github
async-runtime
https://github.com/tokio-rs/tokio/blob/56c43655845b109f59a8cdd5d31d36992fc3ecef/tokio/src/runtime/handle.rs
561
587
tokio-rs/tokio:tokio/src/runtime/handle.rs:12
/// The future produced by `Handle::dump` may never produce `Ready` if /// another runtime worker is blocked for more than 250ms. This may /// occur if a dump is requested during shutdown, or if another runtime /// worker is infinite looping or synchronously deadlocked. For these /// rea...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
cb18b0a231828a3e65d3f64c6d2744751c6b30ed
github
async-runtime
https://github.com/tokio-rs/tokio/blob/cb18b0a231828a3e65d3f64c6d2744751c6b30ed/tokio/src/runtime/handle.rs
441
500
tokio-rs/tokio:tokio/src/runtime/handle.rs:13
} /// Error returned by `try_current` when no Runtime has been started #[derive(Debug)] pub struct TryCurrentError { kind: TryCurrentErrorKind, } impl TryCurrentError { pub(crate) fn new_no_context() -> Self { Self { kind: TryCurrentErrorKind::NoContext, } } pub(crate) fn ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
cb18b0a231828a3e65d3f64c6d2744751c6b30ed
github
async-runtime
https://github.com/tokio-rs/tokio/blob/cb18b0a231828a3e65d3f64c6d2744751c6b30ed/tokio/src/runtime/handle.rs
481
540
tokio-rs/tokio:tokio/src/runtime/handle.rs:14
impl fmt::Debug for TryCurrentErrorKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use TryCurrentErrorKind::*; match self { NoContext => f.write_str("NoContext"), ThreadLocalDestroyed => f.write_str("ThreadLocalDestroyed"), } } } impl fmt::Displ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
cb18b0a231828a3e65d3f64c6d2744751c6b30ed
github
async-runtime
https://github.com/tokio-rs/tokio/blob/cb18b0a231828a3e65d3f64c6d2744751c6b30ed/tokio/src/runtime/handle.rs
521
541
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
tokio_taskdump, feature = "rt", target_os = "linux", any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64") ))] let future = super::task::trace::Trace::root(future); #[cfg(all(tokio_unstable, feature = "tracing"))] let future = crate...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
cbb3c155dd416f6e6a26be5e3b2ebc02853e4b62
github
async-runtime
https://github.com/tokio-rs/tokio/blob/cbb3c155dd416f6e6a26be5e3b2ebc02853e4b62/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
cfg_metrics! { use crate::runtime::RuntimeMetrics; impl Handle { /// Returns a view that lets you get information about how the runtime /// is performing. pub fn metrics(&self) -> RuntimeMetrics { RuntimeMetrics::new(self.clone()) } } } cfg_taskdump! { impl ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
cbb3c155dd416f6e6a26be5e3b2ebc02853e4b62
github
async-runtime
https://github.com/tokio-rs/tokio/blob/cbb3c155dd416f6e6a26be5e3b2ebc02853e4b62/tokio/src/runtime/handle.rs
361
420
tokio-rs/tokio:tokio/src/runtime/handle.rs:11
let (tx, rx) = crate::sync::oneshot::channel(); crate::loom::thread::spawn(|| { let rt = crate::runtime::Builder::new_current_thread().build().unwrap(); rt.block_on(async { let _ = tx.send(f.await); }); }); rx.await....
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
cbb3c155dd416f6e6a26be5e3b2ebc02853e4b62
github
async-runtime
https://github.com/tokio-rs/tokio/blob/cbb3c155dd416f6e6a26be5e3b2ebc02853e4b62/tokio/src/runtime/handle.rs
401
460
tokio-rs/tokio:tokio/src/runtime/handle.rs:12
pub fn is_thread_local_destroyed(&self) -> bool { matches!(self.kind, TryCurrentErrorKind::ThreadLocalDestroyed) } } enum TryCurrentErrorKind { NoContext, ThreadLocalDestroyed, } impl fmt::Debug for TryCurrentErrorKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use Tr...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
cbb3c155dd416f6e6a26be5e3b2ebc02853e4b62
github
async-runtime
https://github.com/tokio-rs/tokio/blob/cbb3c155dd416f6e6a26be5e3b2ebc02853e4b62/tokio/src/runtime/handle.rs
441
471
tokio-rs/tokio:tokio/src/runtime/handle.rs:1
use crate::runtime::{context, scheduler, RuntimeFlavor}; /// 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)] // W...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574
github
async-runtime
https://github.com/tokio-rs/tokio/blob/038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574/tokio/src/runtime/handle.rs
1
60
tokio-rs/tokio:tokio/src/runtime/handle.rs:7
/// }); /// }); /// } /// ``` /// /// [`JoinError`]: struct@crate::task::JoinError /// [`JoinHandle`]: struct@crate::task::JoinHandle /// [`Runtime::block_on`]: fn@crate::runtime::Runtime::block_on /// [`Runtime::shutdown_background`]: fn@crate::runtime::Runtime::shutdown_bac...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574
github
async-runtime
https://github.com/tokio-rs/tokio/blob/038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574/tokio/src/runtime/handle.rs
241
300
tokio-rs/tokio:tokio/src/runtime/handle.rs:8
F::Output: Send + 'static, { let id = crate::runtime::task::Id::next(); #[cfg(all( tokio_unstable, tokio_taskdump, feature = "rt", target_os = "linux", any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64") ))] ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574
github
async-runtime
https://github.com/tokio-rs/tokio/blob/038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574/tokio/src/runtime/handle.rs
281
340
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
#[cfg(all(feature = "rt-multi-thread", not(tokio_wasi)))] scheduler::Handle::MultiThread(_) => RuntimeFlavor::MultiThread, } } } cfg_metrics! { use crate::runtime::RuntimeMetrics; impl Handle { /// Returns a view that lets you get information about how the runtime /// i...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574
github
async-runtime
https://github.com/tokio-rs/tokio/blob/038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
async fn spawn_thread<F>(f: F) -> <F as Future>::Output where F: Future + Send + 'static, <F as Future>::Output: Send + 'static { let (tx, rx) = crate::sync::oneshot::channel(); crate::loom::thread::spawn(|| { let rt = crate::runtime::Build...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574
github
async-runtime
https://github.com/tokio-rs/tokio/blob/038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574/tokio/src/runtime/handle.rs
361
420
tokio-rs/tokio:tokio/src/runtime/handle.rs:11
} /// Returns true if the call failed because the Tokio context thread-local /// had been destroyed. This can usually only happen if in the destructor of /// other thread-locals. pub fn is_thread_local_destroyed(&self) -> bool { matches!(self.kind, TryCurrentErrorKind::ThreadLocalDestroyed) ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574
github
async-runtime
https://github.com/tokio-rs/tokio/blob/038c4d9999ea39e4c9f8ed3f911c5a3c02ebf574/tokio/src/runtime/handle.rs
401
436
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
#[cfg(all(feature = "rt-multi-thread", not(tokio_wasi)))] scheduler::Handle::MultiThread(_) => RuntimeFlavor::MultiThread, } } } cfg_metrics! { use crate::runtime::RuntimeMetrics; impl Handle { /// Returns a view that lets you get information about how the runtime /// i...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
1204da730000f2eab19d2c05eea12ee3071b3f31
github
async-runtime
https://github.com/tokio-rs/tokio/blob/1204da730000f2eab19d2c05eea12ee3071b3f31/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
Self { kind: TryCurrentErrorKind::NoContext, } } pub(crate) fn new_thread_local_destroyed() -> Self { Self { kind: TryCurrentErrorKind::ThreadLocalDestroyed, } } /// Returns true if the call failed because there is currently no runtime in /// the Tok...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
1204da730000f2eab19d2c05eea12ee3071b3f31
github
async-runtime
https://github.com/tokio-rs/tokio/blob/1204da730000f2eab19d2c05eea12ee3071b3f31/tokio/src/runtime/handle.rs
361
411
tokio-rs/tokio:tokio/src/runtime/handle.rs:11
impl fmt::Display for TryCurrentError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use TryCurrentErrorKind::*; match self.kind { NoContext => f.write_str(CONTEXT_MISSING_ERROR), ThreadLocalDestroyed => f.write_str(THREAD_LOCAL_DESTROYED_ERROR), } }...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
1204da730000f2eab19d2c05eea12ee3071b3f31
github
async-runtime
https://github.com/tokio-rs/tokio/blob/1204da730000f2eab19d2c05eea12ee3071b3f31/tokio/src/runtime/handle.rs
401
411
tokio-rs/tokio:tokio/src/runtime/handle.rs:7
/// }); /// }); /// } /// ``` /// /// [`JoinError`]: struct@crate::task::JoinError /// [`JoinHandle`]: struct@crate::task::JoinHandle /// [`Runtime::block_on`]: fn@crate::runtime::Runtime::block_on /// [`Runtime::shutdown_background`]: fn@crate::runtime::Runtime::shutdown_bac...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
d274ef3748b82d7d7eccc39a8482586a4d8a5cc1
github
async-runtime
https://github.com/tokio-rs/tokio/blob/d274ef3748b82d7d7eccc39a8482586a4d8a5cc1/tokio/src/runtime/handle.rs
241
300
tokio-rs/tokio:tokio/src/runtime/handle.rs:8
#[track_caller] pub(crate) fn spawn_named<F>(&self, future: F, _name: Option<&str>) -> JoinHandle<F::Output> where F: Future + Send + 'static, F::Output: Send + 'static, { let id = crate::runtime::task::Id::next(); #[cfg(all( tokio_unstable, tokio_task...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
d274ef3748b82d7d7eccc39a8482586a4d8a5cc1
github
async-runtime
https://github.com/tokio-rs/tokio/blob/d274ef3748b82d7d7eccc39a8482586a4d8a5cc1/tokio/src/runtime/handle.rs
281
340
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
/// ``` pub fn runtime_flavor(&self) -> RuntimeFlavor { match self.inner { scheduler::Handle::CurrentThread(_) => RuntimeFlavor::CurrentThread, #[cfg(all(feature = "rt-multi-thread", not(tokio_wasi)))] scheduler::Handle::MultiThread(_) => RuntimeFlavor::MultiThread, ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
d274ef3748b82d7d7eccc39a8482586a4d8a5cc1
github
async-runtime
https://github.com/tokio-rs/tokio/blob/d274ef3748b82d7d7eccc39a8482586a4d8a5cc1/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
} impl TryCurrentError { pub(crate) fn new_no_context() -> Self { Self { kind: TryCurrentErrorKind::NoContext, } } pub(crate) fn new_thread_local_destroyed() -> Self { Self { kind: TryCurrentErrorKind::ThreadLocalDestroyed, } } /// Returns t...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
d274ef3748b82d7d7eccc39a8482586a4d8a5cc1
github
async-runtime
https://github.com/tokio-rs/tokio/blob/d274ef3748b82d7d7eccc39a8482586a4d8a5cc1/tokio/src/runtime/handle.rs
361
415
tokio-rs/tokio:tokio/src/runtime/handle.rs:11
} } } impl fmt::Display for TryCurrentError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use TryCurrentErrorKind::*; match self.kind { NoContext => f.write_str(CONTEXT_MISSING_ERROR), ThreadLocalDestroyed => f.write_str(THREAD_LOCAL_DESTROYED_ERROR), ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
d274ef3748b82d7d7eccc39a8482586a4d8a5cc1
github
async-runtime
https://github.com/tokio-rs/tokio/blob/d274ef3748b82d7d7eccc39a8482586a4d8a5cc1/tokio/src/runtime/handle.rs
401
415
tokio-rs/tokio:tokio/src/runtime/handle.rs:4
/// The provided future will start running in the background immediately /// when `spawn` is called, even if you don't await the returned /// `JoinHandle`. /// /// 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
660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f
github
async-runtime
https://github.com/tokio-rs/tokio/blob/660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f/tokio/src/runtime/handle.rs
121
180
tokio-rs/tokio:tokio/src/runtime/handle.rs:7
/// } /// ``` /// /// [`JoinError`]: struct@crate::task::JoinError /// [`JoinHandle`]: struct@crate::task::JoinHandle /// [`Runtime::block_on`]: fn@crate::runtime::Runtime::block_on /// [`Runtime::shutdown_background`]: fn@crate::runtime::Runtime::shutdown_background /// [`Runtime::shutdown_...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f
github
async-runtime
https://github.com/tokio-rs/tokio/blob/660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f/tokio/src/runtime/handle.rs
241
300
tokio-rs/tokio:tokio/src/runtime/handle.rs:8
where F: Future + Send + 'static, F::Output: Send + 'static, { let id = crate::runtime::task::Id::next(); #[cfg(all( tokio_unstable, tokio_taskdump, feature = "rt", target_os = "linux", any(target_arch = "aarch64", target_ar...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f
github
async-runtime
https://github.com/tokio-rs/tokio/blob/660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f/tokio/src/runtime/handle.rs
281
340
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
match self.inner { scheduler::Handle::CurrentThread(_) => RuntimeFlavor::CurrentThread, #[cfg(all(feature = "rt-multi-thread", not(tokio_wasi)))] scheduler::Handle::MultiThread(_) => RuntimeFlavor::MultiThread, } } } cfg_metrics! { use crate::runtime::RuntimeMetrics;...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f
github
async-runtime
https://github.com/tokio-rs/tokio/blob/660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:10
impl TryCurrentError { pub(crate) fn new_no_context() -> Self { Self { kind: TryCurrentErrorKind::NoContext, } } pub(crate) fn new_thread_local_destroyed() -> Self { Self { kind: TryCurrentErrorKind::ThreadLocalDestroyed, } } /// Returns true...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f
github
async-runtime
https://github.com/tokio-rs/tokio/blob/660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f/tokio/src/runtime/handle.rs
361
413
tokio-rs/tokio:tokio/src/runtime/handle.rs:11
} impl fmt::Display for TryCurrentError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use TryCurrentErrorKind::*; match self.kind { NoContext => f.write_str(CONTEXT_MISSING_ERROR), ThreadLocalDestroyed => f.write_str(THREAD_LOCAL_DESTROYED_ERROR), } ...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f
github
async-runtime
https://github.com/tokio-rs/tokio/blob/660eac71f0ac7274dc3ba6dd92df9ff2ea61be9f/tokio/src/runtime/handle.rs
401
413
tokio-rs/tokio:tokio/src/runtime/handle.rs:7
/// } /// ``` /// /// [`JoinError`]: struct@crate::task::JoinError /// [`JoinHandle`]: struct@crate::task::JoinHandle /// [`Runtime::block_on`]: fn@crate::runtime::Runtime::block_on /// [`Runtime::shutdown_background`]: fn@crate::runtime::Runtime::shutdown_background /// [`Runtime::shutdown_...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
815d89a407beef40e009efdc7c31716b34449630
github
async-runtime
https://github.com/tokio-rs/tokio/blob/815d89a407beef40e009efdc7c31716b34449630/tokio/src/runtime/handle.rs
241
300
tokio-rs/tokio:tokio/src/runtime/handle.rs:8
/// Returns the flavor of the current `Runtime`. /// /// # Examples /// /// ``` /// use tokio::runtime::{Handle, RuntimeFlavor}; /// /// #[tokio::main(flavor = "current_thread")] /// async fn main() { /// assert_eq!(RuntimeFlavor::CurrentThread, Handle::current().runtime_flavor());...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
815d89a407beef40e009efdc7c31716b34449630
github
async-runtime
https://github.com/tokio-rs/tokio/blob/815d89a407beef40e009efdc7c31716b34449630/tokio/src/runtime/handle.rs
281
340
tokio-rs/tokio:tokio/src/runtime/handle.rs:9
} } /// Error returned by `try_current` when no Runtime has been started #[derive(Debug)] pub struct TryCurrentError { kind: TryCurrentErrorKind, } impl TryCurrentError { pub(crate) fn new_no_context() -> Self { Self { kind: TryCurrentErrorKind::NoContext, } } pub(crate) f...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
815d89a407beef40e009efdc7c31716b34449630
github
async-runtime
https://github.com/tokio-rs/tokio/blob/815d89a407beef40e009efdc7c31716b34449630/tokio/src/runtime/handle.rs
321
380
tokio-rs/tokio:tokio/src/runtime/handle.rs:4
/// The provided future will start running in the background immediately /// when `spawn` is called, even if you don't await the returned /// `JoinHandle`. /// /// 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
06f1a601bb05b1aba9f95020a7fa7572899c588f
github
async-runtime
https://github.com/tokio-rs/tokio/blob/06f1a601bb05b1aba9f95020a7fa7572899c588f/tokio/src/runtime/handle.rs
121
180
tokio-rs/tokio:tokio/src/runtime/handle.rs:4
/// You do not have to `.await` the returned `JoinHandle` to make the /// provided future start execution. It will start running in the background /// immediately when `spawn` is called. /// /// See [module level][mod] documentation for more details. /// /// [mod]: index.html /// /// # E...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
687aa2bae5d6c70bb942238d793d9d2a41e59ac9
github
async-runtime
https://github.com/tokio-rs/tokio/blob/687aa2bae5d6c70bb942238d793d9d2a41e59ac9/tokio/src/runtime/handle.rs
121
180
tokio-rs/tokio:tokio/src/runtime/handle.rs:7
/// } /// ``` /// /// [`JoinError`]: struct@crate::task::JoinError /// [`JoinHandle`]: struct@crate::task::JoinHandle /// [`Runtime::block_on`]: fn@crate::runtime::Runtime::block_on /// [`Runtime::shutdown_background`]: fn@crate::runtime::Runtime::shutdown_background /// [`Runtime::shutdown_...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
32da1aa9da833f6db59d6a97e2a569b780d9f6b4
github
async-runtime
https://github.com/tokio-rs/tokio/blob/32da1aa9da833f6db59d6a97e2a569b780d9f6b4/tokio/src/runtime/handle.rs
241
300
tokio-rs/tokio:tokio/src/runtime/handle.rs:7
/// } /// ``` /// /// [`JoinError`]: struct@crate::task::JoinError /// [`JoinHandle`]: struct@crate::task::JoinHandle /// [`Runtime::block_on`]: fn@crate::runtime::Runtime::block_on /// [`Runtime::shutdown_background`]: fn@crate::runtime::Runtime::shutdown_background /// [`Runtime::shutdown_...
rust
rust
rust-source
tokio-rs/tokio
tokio/src/runtime/handle.rs
MIT
b1f40f4356c7f7be0e1959f992608d2058a76deb
github
async-runtime
https://github.com/tokio-rs/tokio/blob/b1f40f4356c7f7be0e1959f992608d2058a76deb/tokio/src/runtime/handle.rs
241
300