Comment by ChrisLomont

7 years ago

Yep. And this thread illustrates why threading is hard, especially in C++ :)

Oh, and sig_atomic_t is not guaranteed thread-safe, only signal safe. The difference is when you move your code from a single cpu to dual cpu system it breaks. I ran across this some time ago moving stuff to an ESP32.

Atomic so far works best across the chips I’m poking at.