Date: Tue, 19 Jul 2022 16:34:39 +0500
On 19/07/2022 14:00, Andrey Semashev via Std-Discussion wrote:
> http://eel.is/c++draft/atomics#wait-4
>
> <quote>
> A call to an atomic waiting operation on an atomic object M is eligible
> to be unblocked by a call to an atomic notifying operation on M if there
> exist side effects X and Y on M such that:
>
> - the atomic waiting operation has blocked after observing the result of X,
> - X precedes Y in the modification order of M, and
> - Y happens before the call to the atomic notifying operation.
> </quote>
>
> Here, X is the initial initialization of the atomic to false
Just BTW, initialization is not a side effect, but this is a separate issue, one can explicitly assign false in the main thread to "produce" X.
> http://eel.is/c++draft/atomics#wait-4
>
> <quote>
> A call to an atomic waiting operation on an atomic object M is eligible
> to be unblocked by a call to an atomic notifying operation on M if there
> exist side effects X and Y on M such that:
>
> - the atomic waiting operation has blocked after observing the result of X,
> - X precedes Y in the modification order of M, and
> - Y happens before the call to the atomic notifying operation.
> </quote>
>
> Here, X is the initial initialization of the atomic to false
Just BTW, initialization is not a side effect, but this is a separate issue, one can explicitly assign false in the main thread to "produce" X.
Received on 2022-07-19 11:34:45