我想要实现类似于这样的功能:
thread t; // create/initialize thread
t.launch(); // launch thread.
t.wait(); // wait
t.launch(); // relaunch the same thread
如何使用boost线程来实现这样的功能呢? 实际上,我需要一个持久的可重新启动的线程。
我希望避免工作队列,因为在我的情况下实现起来有些困难。
谢谢。
我想要实现类似于这样的功能:
thread t; // create/initialize thread
t.launch(); // launch thread.
t.wait(); // wait
t.launch(); // relaunch the same thread