Skip to content

Commit

Permalink
Fix typos in thread::park documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Raimundo committed May 7, 2017
1 parent fa0cdaa commit 03c9510
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/libstd/thread/mod.rs
Expand Up @@ -518,7 +518,7 @@ pub fn sleep(dur: Duration) {
/// # park and unpark
///
/// Every thread is equipped with some basic low-level blocking support, via the
/// [`thread::park`][`park`] function and [`thread::Thread::unpark()`][`unpark`]
/// [`thread::park`][`park`] function and [`thread::Thread::unpark`][`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.
Expand Down Expand Up @@ -555,6 +555,7 @@ pub fn sleep(dur: Duration) {
///
/// ```
/// use std::thread;
/// use std::time::Duration;
///
/// let parked_thread = thread::Builder::new()
/// .spawn(|| {
Expand Down Expand Up @@ -598,7 +599,7 @@ pub fn park() {
/// Blocks unless or until the current thread's token is made available or
/// the specified duration has been reached (may wake spuriously).
///
/// The semantics of this function are equivalent to [`park()`][park] except
/// The semantics of this function are equivalent to [`park`][park] except
/// that the thread will be blocked for roughly no longer than `dur`. This
/// method should not be used for precise timing due to anomalies such as
/// preemption or platform differences that may not cause the maximum
Expand All @@ -617,7 +618,7 @@ pub fn park_timeout_ms(ms: u32) {
/// Blocks unless or until the current thread's token is made available or
/// the specified duration has been reached (may wake spuriously).
///
/// The semantics of this function are equivalent to [`park()`][park] except
/// The semantics of this function are equivalent to [`park`][park] except
/// that the thread will be blocked for roughly no longer than `dur`. This
/// method should not be used for precise timing due to anomalies such as
/// preemption or platform differences that may not cause the maximum
Expand Down Expand Up @@ -780,7 +781,7 @@ impl Thread {
/// Atomically makes the handle's token available if it is not already.
///
/// Every thread is equipped with some basic low-level blocking support, via
/// the [`park()`][park] function and the `unpark()` method. These can be
/// the [`park`][park] function and the `unpark()` method. These can be
/// used as a more CPU-efficient implementation of a spinlock.
///
/// See the [park documentation][park] for more details.
Expand All @@ -789,6 +790,7 @@ impl Thread {
///
/// ```
/// use std::thread;
/// use std::time::Duration;
///
/// let parked_thread = thread::Builder::new()
/// .spawn(|| {
Expand Down

0 comments on commit 03c9510

Please sign in to comment.