From: Greg Ames Date: Sat, 27 Nov 2004 19:29:26 +0000 (+0000) Subject: only need one main listener loop. X-Git-Tag: 2.1.2~104 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c448acc3a29ce7f6a41ac32dfbce4388e198606;p=apache only need one main listener loop. logic changes only to minimize diff. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106743 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/experimental/event/event.c b/server/mpm/experimental/event/event.c index 614469a5cf..3e4af4f470 100644 --- a/server/mpm/experimental/event/event.c +++ b/server/mpm/experimental/event/event.c @@ -839,19 +839,12 @@ static void *listener_thread(apr_thread_t * thd, void *dummy) unblock_signal(LISTENER_SIGNAL); apr_signal(LISTENER_SIGNAL, dummy_signal_handler); - while (1) { - /* TODO: requests_this_child should be synchronized - aaron */ - if (requests_this_child <= 0) { - check_infinite_requests(); - } - - if (listener_may_exit) - break; - - /* We've already decremented the idle worker count inside - * ap_queue_info_wait_for_idler. */ while (!listener_may_exit) { + if (requests_this_child <= 0) { + check_infinite_requests(); + } + rc = apr_pollset_poll(event_pollset, timeout_interval, &num, &out_pfd); @@ -992,8 +985,7 @@ static void *listener_thread(apr_thread_t * thd, void *dummy) } apr_thread_mutex_unlock(timeout_mutex); - } /* while we are to keep listening */ - } /* while 1 - main loop */ + } /* listener main loop */ ap_queue_term(worker_queue); dying = 1;