Skip to content

Commit 4b75dc4

Browse files
committed
thread: 'dur' -> 'duration'
Also: - italize the binding name - complete a sentence
1 parent 80a0d82 commit 4b75dc4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libstd/thread.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,18 +402,18 @@ pub fn park() {
402402
/// the specified duration has been reached (may wake spuriously).
403403
///
404404
/// The semantics of this function are equivalent to `park()` except that the
405-
/// thread will be blocked for roughly no longer than dur. This method
405+
/// thread will be blocked for roughly no longer than *duration*. This method
406406
/// should not be used for precise timing due to anomalies such as
407407
/// preemption or platform differences that may not cause the maximum
408-
/// amount of time waited to be precisely dur
408+
/// amount of time waited to be precisely *duration* long.
409409
///
410410
/// See the module doc for more detail.
411411
#[unstable(feature = "std_misc", reason = "recently introduced, depends on Duration")]
412-
pub fn park_timeout(dur: Duration) {
412+
pub fn park_timeout(duration: Duration) {
413413
let thread = current();
414414
let mut guard = thread.inner.lock.lock().unwrap();
415415
if !*guard {
416-
let (g, _) = thread.inner.cvar.wait_timeout(guard, dur).unwrap();
416+
let (g, _) = thread.inner.cvar.wait_timeout(guard, duration).unwrap();
417417
guard = g;
418418
}
419419
*guard = false;
@@ -502,11 +502,11 @@ impl Thread {
502502
/// Deprecated: use module-level free function.
503503
#[deprecated(since = "1.0.0", reason = "use module-level free function")]
504504
#[unstable(feature = "std_misc", reason = "recently introduced")]
505-
pub fn park_timeout(dur: Duration) {
505+
pub fn park_timeout(duration: Duration) {
506506
let thread = current();
507507
let mut guard = thread.inner.lock.lock().unwrap();
508508
if !*guard {
509-
let (g, _) = thread.inner.cvar.wait_timeout(guard, dur).unwrap();
509+
let (g, _) = thread.inner.cvar.wait_timeout(guard, duration).unwrap();
510510
guard = g;
511511
}
512512
*guard = false;

0 commit comments

Comments
 (0)