
7 Feb
2009
7 Feb
'09
8:59 p.m.
On Feb 7, 2009, at 2:30 PM, Andrey Semashev wrote:
Boris Schaeling wrote:
Why is thread_interrupted not derived from thread_exception or std::exception? It might easily slip through a try/catch-block, and if I hadn't looked up the header file now it might have slipped through mine.
I assume, this is the intention. The thread_interrupted exception is thrown when the thread is canceled in order to unwind the stack up to the Boost.Thread thread function trampoline. Normally, you should not catch it.
<nod> That was the intent: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2320.html#ThreadsWo... (named thread_canceled here) -Howard