diff options
| author | bors <bors@rust-lang.org> | 2020-05-14 19:35:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-05-14 19:35:24 +0000 |
| commit | a74d1862d4d87a56244958416fd05976c58ca1a8 (patch) | |
| tree | b64230280cd4a445e65ae665e0097b548e9c3989 /src/libstd/thread | |
| parent | af6d8865fe0e1f6338c32cb3370802f2ebca0dc4 (diff) | |
| parent | 7b5bc61e99ea77ff87233295fc3e789e43dd66f0 (diff) | |
| download | rust-a74d1862d4d87a56244958416fd05976c58ca1a8.tar.gz rust-a74d1862d4d87a56244958416fd05976c58ca1a8.zip | |
Auto merge of #72202 - Dylan-DPC:rollup-6lbxh1s, r=Dylan-DPC
Rollup of 8 pull requests Successful merges: - #71910 (Fix unused_parens false positive when using binary operations) - #72087 (Fix hang in lexical_region_resolve) - #72126 (Change `WorkProduct::saved_files` to an `Option`.) - #72127 (add long error explanation for E0228) - #72141 (Warn against thread::sleep in async fn) - #72170 (use `require_lang_item` over `unwrap`.) - #72191 (Clean up E0589 explanation) - #72194 (Don't ICE on missing `Unsize` impl) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 738f07250b5..3134a596756 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -737,6 +737,8 @@ pub fn panicking() -> bool { /// The thread may sleep longer than the duration specified due to scheduling /// specifics or platform-dependent functionality. It will never sleep less. /// +/// This function is blocking, and should not be used in `async` functions. +/// /// # Platform-specific behavior /// /// On Unix platforms, the underlying syscall may be interrupted by a @@ -763,6 +765,8 @@ pub fn sleep_ms(ms: u32) { /// The thread may sleep longer than the duration specified due to scheduling /// specifics or platform-dependent functionality. It will never sleep less. /// +/// This function is blocking, and should not be used in `async` functions. +/// /// # Platform-specific behavior /// /// On Unix platforms, the underlying syscall may be interrupted by a |
