casWeak

Stores 'writeThis' to the memory referenced by 'here' if the value referenced by 'here' is equal to 'ifThis'. The 'weak' version of cas may spuriously fail. It is recommended to use casWeak only when cas would be used in a loop. This operation is both lock-free and atomic. *

Parameters

here
Type: T*

The address of the destination variable.

writeThis
Type: V2

The value to store.

ifThis
Type: V1

The comparison value. *

Return Value

Type: bool

true if the store occurred, false if not.

Suggestion Box / Bug Report