This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Destructors and Threads, perfect together?
- To: egcs at egcs dot cygnus dot com
- Subject: Destructors and Threads, perfect together?
- From: george at moberg dot com
- Date: Wed, 12 May 1999 17:50:30 -0400 (EDT)
Here's a wacky question.
My environment is EGCS 1.1.2, RH Linux 5.2 with the 2.2 kernel, pthreads, and
glibc6.
Say I've got some thread doing some work and it blocks on a mutex or something,
and it's constructed some objects on the stack, in both the function that blocks
and the functions deeper on the call stack. If another thread calls
pthread_cancel(), am I guaranteed that all the objects on the stack will have
their destructors called before the thread is cancelled?
---
George T. Talbot
<george@moberg.com>