]> git.lizzy.rs Git - rust.git/commitdiff
Added a big-picture explanation for thread::park() & co.
authorPyry Kontio <pyry.kontio@drasa.eu>
Mon, 16 May 2016 05:01:21 +0000 (14:01 +0900)
committerPyry Kontio <pyry.kontio@drasa.eu>
Mon, 16 May 2016 05:01:21 +0000 (14:01 +0900)
src/libstd/thread/mod.rs

index 99e6ba8c770b92b3bc68a499de4cb92fdf971418..dc26370590cf825297e0e9d5901e79d1191ed144 100644 (file)
 //! ## 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: