class threadAsync { atomic_bool exitf_; int count_; string name_; public: threadAsync(string threadName) : exitf_(false), count_(0), name_(threadName) {} ~threadAsync() { exitf_ = true; } bool OnThread(bool* run) { while (!exitf_) { if (*run) { printf("%s : %d\n", name_.c_str(), count_); count_++; this_thread::sleep_for(100ms); } else { this_thread::sleep_for(100ms); this_thread::yield(); } } re..