]> granicus.if.org Git - apache/commitdiff
Use apr_pollset_wakeup to ensure that the listener thread will process most enqueue...
authorPaul Querna <pquerna@apache.org>
Tue, 15 Nov 2011 15:52:59 +0000 (15:52 +0000)
committerPaul Querna <pquerna@apache.org>
Tue, 15 Nov 2011 15:52:59 +0000 (15:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1202259 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/event/event.c

index c20f387ec349d7cd895a00515902ad5f6621ecb3..7c532b394b90b8a0cefc523ddcbb971f3dd42c30 100644 (file)
@@ -836,6 +836,7 @@ static int start_lingering_close(conn_state_t *cs, ap_equeue_t *eq)
         v->cs = cs;
         if (eq != NULL) {
             ap_equeue_writer_onward(eq);
+            apr_pollset_wakeup(event_pollset);
         }
         else {
             process_pollop(v);
@@ -994,6 +995,7 @@ read_request:
             v->tag = "process_socket(write_completion)";
 
             ap_equeue_writer_onward(eq);
+            apr_pollset_wakeup(event_pollset);
             return 1;
         }
         else if (c->keepalive != AP_CONN_KEEPALIVE || c->aborted ||
@@ -1035,6 +1037,7 @@ read_request:
         cs->pfd.reqevents = APR_POLLIN;
         v->tag = "process_socket(keepalive)";
         ap_equeue_writer_onward(eq);
+        apr_pollset_wakeup(event_pollset);
     }
     return 1;
 }
@@ -1944,7 +1947,7 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy)
                                                 * connections in K-A or lingering
                                                 * close?
                                                 */
-                            pchild, APR_POLLSET_NOCOPY);
+                            pchild, APR_POLLSET_WAKEABLE|APR_POLLSET_NOCOPY);
     if (rv != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
                      "apr_pollset_create with Thread Safety failed.");
@@ -2860,7 +2863,7 @@ static int event_pre_config(apr_pool_t * pconf, apr_pool_t * plog,
     ++retained->module_loads;
     if (retained->module_loads == 2) {
         rv = apr_pollset_create(&event_pollset, 1, plog,
-                                APR_POLLSET_NOCOPY);
+                                APR_POLLSET_WAKEABLE|APR_POLLSET_NOCOPY);
         if (rv != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
                          "Couldn't create a suiteable pollset. "