Skip to content

Commit b63517a

Browse files
author
Vasya Novikov
committed
update wording for thread::sleep
1 parent 049ccbb commit b63517a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libstd/thread/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -674,17 +674,17 @@ pub fn sleep_ms(ms: u32) {
674674
sleep(Duration::from_millis(ms as u64))
675675
}
676676

677-
/// Puts the current thread to sleep for the specified amount of time.
677+
/// Puts the current thread to sleep for at least the specified amount of time.
678678
///
679679
/// The thread may sleep longer than the duration specified due to scheduling
680-
/// specifics or platform-dependent functionality.
680+
/// specifics or platform-dependent functionality. It will never sleep less.
681681
///
682682
/// # Platform-specific behavior
683683
///
684-
/// On Unix platforms this function will not return early due to a
685-
/// signal being received or a spurious wakeup. Platforms which do not support
686-
/// nanosecond precision for sleeping will have `dur` rounded up to the nearest
687-
/// granularity of time they can sleep for.
684+
/// On Unix platforms this function may invoke multiple syscalls
685+
/// in case of a signal being received or a spurious wakeup.
686+
/// Platforms which do not support nanosecond precision for sleeping will
687+
/// have `dur` rounded up to the nearest granularity of time they can sleep for.
688688
///
689689
/// # Examples
690690
///

0 commit comments

Comments
 (0)