diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-17 15:20:19 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-17 15:20:19 +0530 |
| commit | 46200e5090c94f2ab1812a00c0fd778a6784e2e9 (patch) | |
| tree | e68d0ee7b4e7faf1c04f7e1661aae160002318bc /src/libstd | |
| parent | e8889c94046c89e8d80e9218b000ab36b1271f47 (diff) | |
| parent | 4b75dc464868e6800ee73911b50e440de45f783d (diff) | |
| download | rust-46200e5090c94f2ab1812a00c0fd778a6784e2e9.tar.gz rust-46200e5090c94f2ab1812a00c0fd778a6784e2e9.zip | |
Rollup merge of #23427 - tshepang:dur-becomes-duration, r=steveklabnik
Also: - italize the binding name - complete a sentence
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/thread.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index adc3b77407a..a40b26c85be 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -402,18 +402,18 @@ pub fn park() { /// 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 +/// thread will be blocked for roughly no longer than *duration*. 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 +/// amount of time waited to be precisely *duration* long. /// /// See the module doc for more detail. #[unstable(feature = "std_misc", reason = "recently introduced, depends on Duration")] -pub fn park_timeout(dur: Duration) { +pub fn park_timeout(duration: Duration) { let thread = current(); let mut guard = thread.inner.lock.lock().unwrap(); if !*guard { - let (g, _) = thread.inner.cvar.wait_timeout(guard, dur).unwrap(); + let (g, _) = thread.inner.cvar.wait_timeout(guard, duration).unwrap(); guard = g; } *guard = false; @@ -502,11 +502,11 @@ impl Thread { /// Deprecated: use module-level free function. #[deprecated(since = "1.0.0", reason = "use module-level free function")] #[unstable(feature = "std_misc", reason = "recently introduced")] - pub fn park_timeout(dur: Duration) { + pub fn park_timeout(duration: Duration) { let thread = current(); let mut guard = thread.inner.lock.lock().unwrap(); if !*guard { - let (g, _) = thread.inner.cvar.wait_timeout(guard, dur).unwrap(); + let (g, _) = thread.inner.cvar.wait_timeout(guard, duration).unwrap(); guard = g; } *guard = false; |
