Register
handmade.network»Wiki»Tutorial/Multithreading
#21672 ratchetfreak Sept. 29, 2019, 11:26 a.m.

You should perhaps start with volatile. Even the first example is invalid, busy wait on a variable the compiler may optimize out the read from and the race condition.