]> granicus.if.org Git - php/commitdiff
- Lock the whole thing for now in order not to have a race condition.
authorAndi Gutmans <andi@php.net>
Thu, 5 Apr 2001 14:00:54 +0000 (14:00 +0000)
committerAndi Gutmans <andi@php.net>
Thu, 5 Apr 2001 14:00:54 +0000 (14:00 +0000)
  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.

TSRM/TSRM.c

index 4425036ea75eed402789cb9a0a6b0ad5c91f3ea0..cef4addab02e77d6253f218801dfce6365f1ddaf 100644 (file)
@@ -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; i<thread_resources->count; 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; i<thread_resources->count; i++) {
                                free(thread_resources->storage[i]);
                        }
-                       tsrm_mutex_lock(tsmm_mutex);
                        free(thread_resources->storage);
                        if (last) {
                                last->next = thread_resources->next;