Skip to content

Commit 6ed524d

Browse files
committed
mpm_event,mpm_worker: Comment about pollset sizing when APR_POLLSET_WAKEABLE.
Follow up to r1916925 and r1916926. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916929 13f79535-47bb-0310-9956-ffa450edef68
1 parent d010a86 commit 6ed524d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

server/mpm/event/event.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -2628,7 +2628,10 @@ static void setup_threads_runtime(void)
26282628
clean_child_exit(APEXIT_CHILDFATAL);
26292629
}
26302630

2631-
/* Create the main pollset */
2631+
/* Create the main pollset. When APR_POLLSET_WAKEABLE is asked we account
2632+
* for the wakeup pipe explicitely with pollset_size+1 because some pollset
2633+
* implementations don't do it implicitely in APR.
2634+
*/
26322635
pollset_flags = APR_POLLSET_THREADSAFE | APR_POLLSET_NOCOPY |
26332636
APR_POLLSET_WAKEABLE | APR_POLLSET_NODEFAULT;
26342637
for (i = 0; i < sizeof(good_methods) / sizeof(good_methods[0]); i++) {

server/mpm/worker/worker.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,10 @@ static void setup_threads_runtime(void)
909909
clean_child_exit(APEXIT_CHILDFATAL);
910910
}
911911

912-
/* Create the main pollset */
912+
/* Create the main pollset. When APR_POLLSET_WAKEABLE is asked we account
913+
* for the wakeup pipe explicitely with num_listensocks+1 because some
914+
* pollset implementations don't do it implicitely in APR.
915+
*/
913916
pollset_flags = APR_POLLSET_NOCOPY | APR_POLLSET_WAKEABLE;
914917
rv = apr_pollset_create(&worker_pollset, num_listensocks + 1, pruntime,
915918
pollset_flags);

0 commit comments

Comments
 (0)