[Gc] GC_thread_exit_proc error on win32_threads.c

Tommaso Tagliapietra (EXT VE SYS) tommaso.tagliapietra at enel.it
Tue Jun 6 08:08:16 PDT 2006


However never of my threads are joined. Can be the attribute the problem?

Tommy


----- Original Message ----- 
From: "Hans Boehm" <Hans.Boehm at hp.com>
To: "Tommaso Tagliapietra (EXT VE SYS)" <tommaso.tagliapietra at enel.it>
Cc: "Boehm, Hans" <hans.boehm at hp.com>; <gc at napali.hpl.hp.com>
Sent: Tuesday, June 06, 2006 4:57 PM
Subject: Re: [Gc] GC_thread_exit_proc error on win32_threads.c


>
>
> 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.
>
> Hans
> 



More information about the Gc mailing list