Skip to content

Commit

Permalink
fix safety docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah-Kennedy committed Oct 2, 2024
1 parent 66f2244 commit 4ed6f12
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tokio/src/runtime/scheduler/current_thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ impl Handle {
/// Spawn a task which isn't safe to send across thread boundaries onto the runtime.
///
/// # Safety
/// This should only be used when this is a LocalRuntime or in another case where the runtime
/// provably cannot be driven from or moved to different threads from the one on which the task
/// is spawned.
pub(crate) unsafe fn spawn_local<F>(
me: &Arc<Self>,
future: F,
Expand Down

0 comments on commit 4ed6f12

Please sign in to comment.