Release semantics prevent writes from moving later than a synchronization operation. Releasing a lock writes shared changes back to memory, making them available to the next thread that acquires it. section 7.2
Use release semantics as part of a broader memory-ordering discipline:
- Pair lock release with acquire semantics: acquisition prevents reads from moving earlier, while release prevents writes from moving later. section 7.2
- Protect shared data with locks rather than relying on C# volatile semantics, which may not guarantee the latest value. section 7.2
- Treat memory barriers and the memory model as the mechanisms governing which compiler and CPU reorderings remain allowed. section 7.2
Figure 7.1 Acquire and release semantics
Figure 7.1 visualizes how acquire and release semantics constrain memory-operation movement. section 7.2



