Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2008-07-16 14:47:29


on Wed Jul 16 2008, Ruediger Berlich <ruediger.berlich-AT-iwr.fzk.de> wrote:

> Hi there,
>
> is there a recommended strategy for exception (or more generally
> error-)handling with Boost.thread ? From what I can see it is not safe to
> throw an exception from within a thread, as it is not sure who catches it
> (or whether it gets caught at all).

You can throw as long as the exception will be caught before it
propagates out of the thread function. You can always put a
try/catch(...) block in all your thread functions.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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