]> granicus.if.org Git - apache/commitdiff
Removed some code from the mutex-protected block in ap_queue_pop().
authorBrian Pane <brianp@apache.org>
Mon, 29 Apr 2002 01:57:39 +0000 (01:57 +0000)
committerBrian Pane <brianp@apache.org>
Mon, 29 Apr 2002 01:57:39 +0000 (01:57 +0000)
If the worker thread synchronization is working properly, it's not
necessary to set these fields to NULL after removing an element from
the queue, and it's IMO more important to have a shorter code path
leading up to the mutex_unlock.  I left in support for NULLing the
fields when debugging, though.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94850 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/worker/fdqueue.c

index 14c17e7ecf05924ff986f2822ad385c4beeed2e5..b582929e15397843ccf7d74ee1635d6e40bc4a00 100644 (file)
@@ -317,8 +317,10 @@ apr_status_t ap_queue_pop(fd_queue_t *queue, apr_socket_t **sd, apr_pool_t **p)
     elem = &queue->data[--queue->nelts];
     *sd = elem->sd;
     *p = elem->p;
+#ifdef AP_DEBUG
     elem->sd = NULL;
     elem->p = NULL;
+#endif /* AP_DEBUG */
 
     rv = apr_thread_mutex_unlock(queue->one_big_mutex);
     return rv;