You are performing an unsynchronized stream exchange. Sirens should disappear.
As I understand it, the JIT memory model allows you to read completeonce and store it in a register. For this reason, an update from Main never becomes visible.
Regarding fixing this, the easiest way is to combine access blocking to complete. You can also use Thread.VolatileReadand Thread.VolatileWrite.
source
share