Skip to content

Commit

Permalink
Enhanced wording for coop paragraph in runtime compatiblity section
Browse files Browse the repository at this point in the history
Co-authored-by: Alice Ryhl <aliceryhl@google.com>
  • Loading branch information
jofas and Darksonn authored Sep 10, 2024
1 parent 031344e commit d8dee34
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tokio/src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,8 @@
//! or even use them from non-Tokio runtimes.
//!
//! When used in a Tokio runtime, the synchronization primitives participate in
//! [cooperative scheduling](crate::task#cooperative-scheduling),
//! periodically yielding back control to the runtime to avoid starving it.
//! In a non-Tokio runtime, the yield points where control is handed back do
//! nothing, not changing the behavior of the synchronization primitive in any
//! way.
//! [cooperative scheduling](crate::task#cooperative-scheduling) to avoid
//! starvation. This feature does not apply when used from non-Tokio runtimes.
//!
//! The only exception to runtime compatibility is the
//! [`mpsc::Sender::send_timeout`] method, which can't be called from non-Tokio
Expand Down

0 comments on commit d8dee34

Please sign in to comment.