[Gc] GC_thread_exit_proc error on win32_threads.c

Hans Boehm Hans.Boehm at hp.com
Tue Jun 6 07:57:49 PDT 2006

On Tue, 6 Jun 2006, Tommaso Tagliapietra (EXT VE SYS) wrote:

> All threads are created with PTHREAD_CREATE_JOINABLE | PTHREAD_CREATE_DETACHED attribute and GC_pthread_create. At the end of the start_function of a thread I use a pthread_cleanup_push to call a function that change a flag in a struct, and than a pthread_cleanup_pop(1).
Don't do that.  PTHREAD_CREATE_JOINABLE means that the thread data
structure will persists after the thread finishes, and has to be
explicitly deallocated with pthread_join.  PTHREAD_CREATE_DETACHED
means it won't persists, and hence the thread can't be joined.  You can't
have it both ways.


More information about the Gc mailing list