
What's the proper way to make sure user-created exceptions are propagated between threads? When a user exception is thrown from packaged_task, future.get() throws "boost::unknown_exception". I understand that without a language support it's impossible to propagate the exception correctly, but I couldn't find any documentation that describes proper steps. I tried deriving my_exception from std::exception - didn't help. Thanks, Andy. P.S. There's no boost::async() equivalent to std::async(), is there?

AMDG On 03/10/2011 08:24 AM, Andy Venikov wrote:
What's the proper way to make sure user-created exceptions are propagated between threads?
When a user exception is thrown from packaged_task, future.get() throws "boost::unknown_exception".
I understand that without a language support it's impossible to propagate the exception correctly, but I couldn't find any documentation that describes proper steps. I tried deriving my_exception from std::exception - didn't help.
See http://www.boost.org/libs/exception/doc/tutorial_exception_ptr.html In Christ, Steven Watanabe
participants (2)
-
Andy Venikov
-
Steven Watanabe