p4raw-id: //depot/perl@14678
static perl_mutex create_mutex; /* protects the creation of threads ??? */
I32 tid_counter = 0;
-
+I32 active_threads = 0;
perl_key self_key;
/*
threads = thread->next;
}
}
+ active_threads--;
MUTEX_UNLOCK(&create_mutex);
/* Thread is now disowned */
#if 0
#endif
}
#endif
+ active_threads++;
MUTEX_UNLOCK(&create_mutex);
return ithread_to_SV(aTHX_ obj, thread, classname, FALSE);
}
thread->interp = aTHX;
thread->count = 1; /* imortal */
thread->tid = tid_counter++;
+ active_threads++;
thread->detached = 1;
#ifdef WIN32
thread->thr = GetCurrentThreadId();