标签: c++ multithreading posix
我知道条件的一些技巧,但没有帮助。
假设我的线程函数中有无限循环。我怎样才能暂停这个帖子,而不是所有进程?
答案 0 :(得分:1)
使用std::condition_variable或std::this_thread::sleep_for