Skip to content

Commit 20b9129

Browse files
committed
Added a big-picture explanation for thread::park() & co.
1 parent bb39c49 commit 20b9129

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libstd/thread/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@
101101
//! ## Blocking support: park and unpark
102102
//!
103103
//! Every thread is equipped with some basic low-level blocking support, via the
104-
//! `park` and `unpark` functions.
104+
//! `thread::park()` function and `thread::Thread::unpark()` method. `park()`
105+
//! blocks the current thread, which can then be resumed from another thread by
106+
//! calling the `unpark()` method on the blocked thread's handle.
105107
//!
106108
//! Conceptually, each `Thread` handle has an associated token, which is
107109
//! initially not present:

0 commit comments

Comments
 (0)