How To Allow Atomics Use In C++ Signal Handlers
September 8, 2023
C++11 allows the use of atomics in signal handlers, and with the advent of C++ 17 the signal handler feature was again improved. The std::atomic_flag is an atomic boolean type that is guaranteed to be lock-free and can be used in signal handlers. Moreover, the header in C++ has an integer type std::sig_atomic_t that can be accessed as an atomic entity even in the presence of asynchronous…

