Issue using std::atomic_flag with worker thread
sorry for the verbosity - I did my best to condense my code sample into a minimally functional class and main() method. I'm trying to use an atomic_flag to notify _rx() within my worker thread to quit when stop() is called. I believe the issue is in trying to create my worker thread, thread SanityTestThread(&SanityTest::_rx, *this); which somehow clashes with my atomic_flag code sample (does not compile): #include <cstdio> #include <chrono> #include <unistd.h> #include <atomic> #include <iostream> #include <thread> using namespace std; class SanityTest { public: SanityTest(){} void start();