Boost logo

Boost Users :

Subject: Re: [Boost-users] throw and catch exception
From: Andrey Moshbear (andrey.vul_at_[hidden])
Date: 2011-10-25 04:13:19


On Tue, Oct 25, 2011 at 03:52, Christer Borgqvist
<christer.borgqvist10_at_[hidden]> wrote:
>
> "Christer Borgqvist" <christer.borgqvist10_at_[hidden]> skrev i meddelandet
> news:000001cc8ef1$fac46820$c500a8c0_at_christer618c56...
>
> I have a code like this
>
> when execute the IdHTTPServDataEMVObj.Exequte();
> it will throw a std::runtime_error
> if running one thread all is fine, the catch is excequted, but if running
> two threads then the application crash.
> What is the problem, have i miss something

Your code doesn't look thread-safe. Try placing locks around variables
that might be shared. Be careful in avoiding deadlock, though.


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