help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC, libgcc & thread-safe exception handling


From: brian
Subject: Re: GCC, libgcc & thread-safe exception handling
Date: 20 Aug 2005 06:47:55 -0700
User-agent: G2/0.2

Yes, it most certainly is. We use exceptions and Pthreads in
multi-threaded applications with perfect success all the time.

One thing you must be careful of: When your applications calls
pthread_create(), the new thread of execution has its own stack and the
call therefore changes the stack. But C++ doesn't know this and if you
let an exception propogate back down to the caller of pthread_create()
then your application will crash.

Therefore, take care that the target function of a pthread_create()
catches ALL execptions (without exception!!!) and all will be fine.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]