Subject: [boost] [thread] 5351 interrupt a future get boost::unknown_exception
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-12-10 20:41:51
I have reached to compile the example with some variants. See the
attached file in http://svn.boost.org/trac/boost/ticket/5351.
It seems the problem comes from the fact that packaged_task catch every
and store it to rethrow in the wait() function using
As thread_interrupted doesn't inherits from std/boost::exception the
thrown exception is translated as boost::unknown_exception.
A solution could be to catch specifically thread_interrupted and store
When wait is called, a test if the thread has been interrupted is done
so that the exception thread_interrupted is thrown.
if(rethrow && thread_was_interrupted)
The single problem I see is that the this new exception doesn't contains
from where the initial thread_interrupted was thrown.
Could the interested parties inspect the patch attached to
http://svn.boost.org/trac/boost/ticket/5351 and check it, please?
Is there something I forgot or a simple or more robust way to solve this
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk