Created
November 11, 2011 19:59
-
-
Save hamano/1359055 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/server/mpm/worker/fdqueue.c b/server/mpm/worker/fdqueue.c | |
index 6b5485b..7f3e2d6 100644 | |
--- a/server/mpm/worker/fdqueue.c | |
+++ b/server/mpm/worker/fdqueue.c | |
@@ -175,6 +175,18 @@ apr_status_t ap_queue_info_wait_for_idler(fd_queue_info_t *queue_info, | |
return rv; | |
} | |
} | |
+ while (queue_info->idlers == 0) { | |
+ rv = apr_thread_cond_wait(queue_info->wait_for_idler, | |
+ queue_info->idlers_mutex); | |
+ if (rv != APR_SUCCESS) { | |
+ apr_status_t rv2; | |
+ rv2 = apr_thread_mutex_unlock(queue_info->idlers_mutex); | |
+ if (rv2 != APR_SUCCESS) { | |
+ return rv2; | |
+ } | |
+ return rv; | |
+ } | |
+ } | |
rv = apr_thread_mutex_unlock(queue_info->idlers_mutex); | |
if (rv != APR_SUCCESS) { | |
return rv; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment