From: Andi Gutmans Date: Thu, 5 Apr 2001 14:00:54 +0000 (+0000) Subject: - Lock the whole thing for now in order not to have a race condition. X-Git-Tag: php-4.0.6RC1~478 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a943751310c376a26b3c36bdbfc78f62056e49d5;p=php - Lock the whole thing for now in order not to have a race condition. It shouldn't effect performance too much because usually threads are reused a few times before they are nuked by the web server, at least under IIS and Zeus. --- diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index 4425036ea7..cef4addab0 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -337,8 +337,6 @@ void ts_free_thread(void) while (thread_resources) { if (thread_resources->thread_id == thread_id) { - tsrm_mutex_unlock(tsmm_mutex); - for (i=0; icount; i++) { if (resource_types_table[i].dtor) { resource_types_table[i].dtor(thread_resources->storage[i]); @@ -347,7 +345,6 @@ void ts_free_thread(void) for (i=0; icount; i++) { free(thread_resources->storage[i]); } - tsrm_mutex_lock(tsmm_mutex); free(thread_resources->storage); if (last) { last->next = thread_resources->next;