(Cherry-pick commit
45bf28f from 'release-7_4' branch.)
* win32_threads.c [GC_PTHREADS] (GC_pthread_detach): Repeat
GC_lookup_pthread() (with a 10 msec delay) while t is null; add comment
and TODO; remove ABORT if t is null (as t is never null after
pthread_detach call).
DCL_LOCK_STATE;
if (!parallel_initialized) GC_init_parallel();
- t = GC_lookup_pthread(thread);
+ /* The thread might not have registered itself yet. */
+ /* TODO: Wait for registration of the created thread in pthread_create. */
+ while ((t = GC_lookup_pthread(thread)) == NULL)
+ Sleep(10);
result = pthread_detach(thread);
if (result == 0) {
LOCK();