Boost logo

Boost Users :

From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-07-16 16:33:51


On Wed, Jul 16, 2008 at 1:20 PM, Anthony Williams <anthony.ajw_at_[hidden]> wrote:
> "Emil Dotchevski" <emil_at_[hidden]> writes:
>
>> Yet to be released Boost 1.36 includes the new Exception library which
>> among other things supports transporting of exceptions between
>> threads.
>
> This is true. However, users need to be aware that there are currently
> no mechanisms in place with the thread library to do this
> automatically: if you want to transport exceptions you need to catch
> them with boost.Exception yourself, and then transport them.
>
> My futures library
> (http://www.justsoftwaresolutions.co.uk/threading/updated-implementation-of-c++-futures-3.html)
> which is on the Boost review queue provides a packaged_task which can
> be used with boost.thread to transport exceptions to the thread that
> is waiting for the result.

Yes, futures is a higher level library. Boost Exception is very basic,
perhaps at the same level as boost::thread. Just to clarify, this is
how boost::thread and boost::exception can be used together to
transport exceptions between threads:

http://svn.boost.org/svn/boost/trunk/libs/exception/doc/tutorial_exception_ptr.html

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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