Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道一些有条件的技巧,但这没有帮助。
假设我的线程函数中有无限循环。我怎样才能只暂停这个线程,而不是所有进程?
使用std::condition_variable或std::this_thread::sleep_for