BOOST的Thread库博大精深,有很多的多线程概念在里面,今天就对其中很多call都用到的interrupt_wait的实现进行解释。首先,在BOOST文档中,有1个不得不看的概念,如下:
Predefined Interruption Points
The following functions are interruption points, which will throw boost::thread_interrupted
if interruption is enabled for the current thread, and interruption is requested for the current thread: