C++的线程std::thread,互斥量std::mutex,锁lock,原子操作atomic,条件变量condition_variable
void foo(Cpp11* p, int n) { // std::unique_lock<std::mutex> lock(p->m_wait_mutex); std::this_thread::sleep_for(std::chrono::seconds(n)); p->m_cv.notify_one(); std::cout << R"(fo...