|
Boost : |
Subject: Re: [boost] [thread] Why is thread_interrupted not derived from thread_exception or std::exception?
From: Howard Hinnant (hinnant_at_[hidden])
Date: 2009-02-07 15:59:45
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#ThreadsWording
(named thread_canceled here)
-Howard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk