Skip to content

Commit

Permalink
document that handle.enter() allows spawn_local with LocalRuntime
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah-Kennedy committed Oct 12, 2024
1 parent bf5e5f9 commit 85f2c36
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tokio/src/runtime/local_runtime/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,15 @@ impl LocalRuntime {
/// available on creation such as [`Sleep`] or [`TcpStream`]. It will
/// also allow you to call methods such as [`tokio::spawn`].
///
/// If this is a handle to a [`LocalRuntime`], and this function is being invoked from the same
/// thread that the runtime was created on, you will also be able to call
/// [`tokio::task::spawn_local`].
///
/// [`Sleep`]: struct@crate::time::Sleep
/// [`TcpStream`]: struct@crate::net::TcpStream
/// [`tokio::spawn`]: fn@crate::spawn
/// [`LocalRuntime`]: struct@crate::runtime::LocalRuntime
/// [`tokio::task::spawn_local`]: fn@crate::task::spawn_local
///
/// # Example
///
Expand Down

0 comments on commit 85f2c36

Please sign in to comment.