improve wording of thread::park docs

This commit is contained in:
Ibraheem Ahmed 2023-01-01 14:34:22 -05:00 committed by GitHub
parent 1bae661dbc
commit 6e8a0136f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -891,10 +891,9 @@ pub fn sleep(dur: Duration) {
/// performs the corresponding `Acquire` operation. Calls to `unpark` for the same
/// thread form a [release sequence].
///
/// Notice that being unblocked does not imply any synchronization with someone that
/// unparked this thread, it could also be spurious. For example, it would be a valid,
/// but inefficient, implementation to make both park and unpark return immediately
/// without doing anything.
/// Note that being unblocked does not imply synchronization with a call to `unpark`,
/// the wakeup could also be spurious. For example, a valid, but inefficient,
/// implementation could have `park` and `unpark` return immediately without doing anything.
///
/// # Examples
///