
"Alexander" == Alexander Terekhov <terekhov@web.de> writes:
Alexander> Michael Glassford wrote: Alexander> [...]
2) IIUC, with the pthreads cleanup handlers, it is literally unspecified whether they run before or after C++ destructors because pthreads is a C-based standard.
Alexander> What "pthreads cleanup handlers"? Do you mean TSD dtors and/or Alexander> thread cancel/exit cleanup handlers? Thread termination (unwinding Alexander> of cleanup handlers followed by TSD destruction) and program (aka Alexander> process) termination (it runs atexit() handlers and C++ destructors Alexander> for objects with static storage duration, if not abnormal) is fully Alexander> specified. Or do you mean C++ stuff "on the stack", not static Alexander> storage duration? I guess yes, he meant auto objects. IMHO, one can safely assume C++ destructors will be run before cleanup handlers. ~velco