Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost::thread] interrupt a future get boost::unknown_exception
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-03-18 14:45:18


AMDG

On 03/18/2011 11:32 AM, Emil Dotchevski wrote:
> On Fri, Mar 18, 2011 at 3:30 AM, 乔志强<qiaozhiqiang_at_[hidden]> wrote:
>> [Windows XP, VC++ 10, boost 1.46]
>> When interrupt a future, the future.get() throw boost::unknown_exception,
>> Not boost::thread_interrupted.
>>
>> Class boost::thread_interrupted should have a base class for current_exception_impl() to catch it ? or use BOOST_THROW_EXCEPTION in interruptible_wait) ?
> As far as I can tell, boost::thread always throws by calling
> boost::throw_exception which is sufficient for the
> boost::exception_ptr framework to work. Most likely, the
> unknown_exception is a result of attempting to copy a non-boost
> exception.

Actually, interruption_point() just uses throw.
I checked both the pthread and win32 sources.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net