1
Fork 0

a release operation synchronizes with an acquire operation

This commit is contained in:
xmh0511 2024-11-12 09:46:41 +08:00 committed by GitHub
parent 81eef2d362
commit 9517769986
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1001,11 +1001,11 @@ impl Drop for PanicGuard {
///
/// # Memory Ordering
///
/// Calls to `park` _synchronize-with_ calls to `unpark`, meaning that memory
/// Calls to `unpark` _synchronize-with_ calls to `park`, meaning that memory
/// operations performed before a call to `unpark` are made visible to the thread that
/// consumes the token and returns from `park`. Note that all `park` and `unpark`
/// operations for a given thread form a total order and `park` synchronizes-with
/// _all_ prior `unpark` operations.
/// operations for a given thread form a total order and _all_ prior `unpark` operations
/// synchronize-with `park`.
///
/// In atomic ordering terms, `unpark` performs a `Release` operation and `park`
/// performs the corresponding `Acquire` operation. Calls to `unpark` for the same