An introduction to lockless algorithms
An introduction to lockless algorithms
Posted Feb 20, 2021 4:04 UTC (Sat) by itsmycpu (guest, #139639)In reply to: An introduction to lockless algorithms by pebolle
Parent article: An introduction to lockless algorithms
Practically it means that if (step1) the first thread updates data, and then (step2) does a store-release of a value that indicates that the data was written, and then (step3) the second thread does a load-acquire of that value, it will (step4) see all the updates that the first thread has done before step2.
As long as the value read in step3 is the value written in step2 (or a value written after that). Because then you know that step3 > step2, and because of that, step4 > step1.
