diff options
| author | Vasya Novikov <n1dr+cm3513git@ya.ru> | 2018-10-11 21:37:30 +0300 |
|---|---|---|
| committer | Vasya Novikov <n1dr+cm3513git@ya.ru> | 2018-10-11 21:37:30 +0300 |
| commit | 7a0fa95336439120d89bb2f6116146011fd40307 (patch) | |
| tree | e3840003f17165b89adbc69446e869fbea479b6d /src/libstd/thread | |
| parent | b63517a2c3bade20ebfbbd328b11ecf9a1558bd2 (diff) | |
| download | rust-7a0fa95336439120d89bb2f6116146011fd40307.tar.gz rust-7a0fa95336439120d89bb2f6116146011fd40307.zip | |
improve docs on thread::sleep
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/mod.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 70a95326658..3f29a81f25e 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -657,8 +657,10 @@ pub fn panicking() -> bool { /// /// # Platform-specific behavior /// -/// On Unix platforms this function may invoke multiple syscalls -/// in case of a signal being received or a spurious wakeup. +/// On Unix platforms, the underlying syscall may be interrupted by a +/// spurious wakeup or signal handler. To ensure the sleep occurs for at least +/// the specified duration, this function may invoke that system call multiple +/// times. /// /// # Examples /// @@ -681,8 +683,10 @@ pub fn sleep_ms(ms: u32) { /// /// # Platform-specific behavior /// -/// On Unix platforms this function may invoke multiple syscalls -/// in case of a signal being received or a spurious wakeup. +/// On Unix platforms, the underlying syscall may be interrupted by a +/// spurious wakeup or signal handler. To ensure the sleep occurs for at least +/// the specified duration, this function may invoke that system call multiple +/// times. /// Platforms which do not support nanosecond precision for sleeping will /// have `dur` rounded up to the nearest granularity of time they can sleep for. /// |
