Re: [Boost-users] [boost::thread] interrupt a future get boost::unknown_exception

It may be a bug of the thread or future. in boost_1_46_0/doc/html/thread/synchronization.html these Member functions: shared_future class template: Member function get() Member function wait() Member function timed_wait() and unique_future class template: Member function get() Member function wait() Member function timed_wait() Throws: ........ boost::thread_interrupted if the result associated with *this is not ready at the point of the call, and the [current] thread is interrupted. ............ the [current] thread is interrupted. Should be the [working] thread is interrupted ?
[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 to throw ? //////////
namespace boost
{
class thread_interrupted
{};
}
These function use [ throw thread_interrupted(); ] :
this_thread ::interruption_point() // pthread / win32
this_thread::interruptible_wait() // win32
interruption_checker:: check_for_interruption()// pthread
/////////////
// [Windows XP, VC++ 10, boost 1.46]
#include
// unknown_exception////////////////// ERROR: Throw in function (unknown) Dynamic exception type: class boost::exception_detail::clone_impl<class boost::unknown_exception> std::exception::what: Unknown exception
participants (1)
-
乔志强