Hi,

Ivan Maidanski <[email protected]> writes:

>> pthread_setspecific (key, GC_STRDUP ("hello, world"));
>
> Just one note. Are you aware that this code is equivalent (since TLS is not 
> traced by GC) to:
>
> (void)GC_STRDUP ("hello, world");
> pthread_setspecific (key, <some_number>);

Yes.  The only point of this statement is to stress the GC and associate
an initial value with the key (otherwise its destructor is never
called.)

Thanks,
Ludo’.

Reply via email to