This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Destructors and Threads, perfect together?


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]