Skip to content

Added a big-picture explanation for thread::park() & co. #33665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/libstd/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@
//! ## Blocking support: park and unpark
//!
//! Every thread is equipped with some basic low-level blocking support, via the
//! `park` and `unpark` functions.
//! `thread::park()` function and `thread::Thread::unpark()` method. `park()`
//! blocks the current thread, which can then be resumed from another thread by
//! calling the `unpark()` method on the blocked thread's handle.
//!
//! Conceptually, each `Thread` handle has an associated token, which is
//! initially not present:
Expand Down