about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
authorVasya Novikov <n1dr+cm3513git@ya.ru>2018-10-01 11:01:15 +0300
committerVasya Novikov <n1dr+cm3513git@ya.ru>2018-10-01 11:01:15 +0300
commitb63517a2c3bade20ebfbbd328b11ecf9a1558bd2 (patch)
tree2d80c19c15aebb9741757734f71ec226120f9ac8 /src/libstd/thread
parent049ccbb174552bac2f19df5361c3470828bf04c4 (diff)
downloadrust-b63517a2c3bade20ebfbbd328b11ecf9a1558bd2.tar.gz
rust-b63517a2c3bade20ebfbbd328b11ecf9a1558bd2.zip
update wording for thread::sleep
Diffstat (limited to 'src/libstd/thread')
-rw-r--r--src/libstd/thread/mod.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 96ce38d12e1..70a95326658 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -674,17 +674,17 @@ pub fn sleep_ms(ms: u32) {
     sleep(Duration::from_millis(ms as u64))
 }
 
-/// Puts the current thread to sleep for the specified amount of time.
+/// Puts the current thread to sleep for at least the specified amount of time.
 ///
 /// The thread may sleep longer than the duration specified due to scheduling
-/// specifics or platform-dependent functionality.
+/// specifics or platform-dependent functionality. It will never sleep less.
 ///
 /// # Platform-specific behavior
 ///
-/// On Unix platforms this function will not return early due to a
-/// signal being received or a spurious wakeup. Platforms which do not support
-/// nanosecond precision for sleeping will have `dur` rounded up to the nearest
-/// granularity of time they can sleep for.
+/// On Unix platforms this function may invoke multiple syscalls
+/// in case of a signal being received or a spurious wakeup.
+/// Platforms which do not support nanosecond precision for sleeping will
+/// have `dur` rounded up to the nearest granularity of time they can sleep for.
 ///
 /// # Examples
 ///