diff options
| author | Felix Raimundo <felix.raimundo@tweag.io> | 2017-05-07 13:47:39 +0200 |
|---|---|---|
| committer | Felix Raimundo <felix.raimundo@tweag.io> | 2017-05-07 13:47:39 +0200 |
| commit | 061b56bd5ca2d3a49bebdd6a174995e1b3ec6a5b (patch) | |
| tree | 9bd79f5de0e12d5bddd9149fcf7a368b4a5f6850 /src/libstd/thread | |
| parent | a6ab049ed1db09f693df7d33046b3980f56751c1 (diff) | |
| download | rust-061b56bd5ca2d3a49bebdd6a174995e1b3ec6a5b.tar.gz rust-061b56bd5ca2d3a49bebdd6a174995e1b3ec6a5b.zip | |
Add a link to `park` in the `park_timeout` doc.
Part of #29378
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/mod.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 8e7eaa77cd7..dbc8562ea39 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -585,9 +585,9 @@ 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()` except that the -/// thread will be blocked for roughly no longer than `ms`. This method -/// should not be used for precise timing due to anomalies such as +/// 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 /// amount of time waited to be precisely `ms` long. /// @@ -595,6 +595,7 @@ pub fn park() { /// /// [thread]: index.html /// [park_timeout]: fn.park_timeout.html +/// [park]: fn.park.html #[stable(feature = "rust1", since = "1.0.0")] #[rustc_deprecated(since = "1.6.0", reason = "replaced by `std::thread::park_timeout`")] pub fn park_timeout_ms(ms: u32) { @@ -604,9 +605,9 @@ 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()` 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 +/// 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 /// amount of time waited to be precisely `dur` long. /// @@ -635,6 +636,8 @@ pub fn park_timeout_ms(ms: u32) { /// park_timeout(timeout); /// } /// ``` +/// +/// [park]: fn.park.html #[stable(feature = "park_timeout", since = "1.4.0")] pub fn park_timeout(dur: Duration) { let thread = current(); |
