EnterCriticalSection (cs);
if (tp->idle_threads == NULL) {
it->die = TRUE;
+ LeaveCriticalSection (cs);
return NULL; /* We are shutting down */
}
/*
cs = &tp->lock;
threadpool_jobs_inc (ar);
EnterCriticalSection (cs);
- if (tp->idle_threads == NULL)
+ if (tp->idle_threads == NULL) {
+ LeaveCriticalSection (cs);
return; /* We are shutting down */
+ }
if (ar->vtable->domain->state == MONO_APPDOMAIN_UNLOADING ||
ar->vtable->domain->state == MONO_APPDOMAIN_UNLOADED) {
LeaveCriticalSection (cs);