
C++ Exceptions and multithreading
Thanks for the reply.
The same thing happens when in release mode. I might repost to the kernel
newsgroup.
I too don't see why they should hang, cause exceptions are isolated in their
own respective threads (and the that threads' stack). I'm thinking perhaps
throw locks some CRT section that we don't know about.
--
-
Thong Nguyen
http://tummy.veridicus.com
Quote:
> Do you have the same behaviour in both debug and release builds? I've seen
> cases where my code hangs in RaiseException(), but only in debug builds
(but
> maybe I'm just a lucky guy).
> I can't really see any reasons for locking when raising an exception as
> exception information are stored on a thread basis. Maybe it would be
better
> if you posted this question to microsoft.public.win32.kernel instead, the
> guys there should have better insight on this issue.
> // Johan
> > Hi,
> > I've had some trouble using C++ exceptions from multiple threads.
> > The program normally deadlocks inside NTDLL just after cxxThrowException
> > when i have around 50 threads that all try to throw an exception at the
> same
> > time.
> > I've searched around MSDN for any details on locks ThrowException
aquires,
> > but can't find anything :/
> > Anyone got any ideas?
> > --
> > -
> > Thong Nguyen
> > http://tummy.veridicus.com