
AMDG On 03/18/2011 11:32 AM, Emil Dotchevski wrote:
On Fri, Mar 18, 2011 at 3:30 AM, 乔志强
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