Hi Takashi,
looks good, but... On Apr 6 19:57, Takashi Yano wrote: > @@ -1685,7 +1700,15 @@ pthread_key::~pthread_key () > */ > if (magic != 0) > { > - keys.remove (this); > + LONG64 seq = keys[key_idx].seq; > + assert (pthread_key::keys_list::ready (seq) > + && InterlockedCompareExchange64 (&keys[key_idx].seq, > + seq + 1, seq) == seq); ...do we really want to assert here? Shouldn't this better just skip the rest of the function? > + while (InterlockedCompareExchange64 (&keys[key_idx].busy_cnt, > + INT64_MIN, 0) > 0) > + yield (); > + keys[key_idx].key = NULL; > + InterlockedIncrement64 (&keys[key_idx].seq); > TlsFree (tls_index); > } > } Corinna