Skip to content

Commit

Permalink
mpm_event,mpm_worker: Comment about pollset sizing when APR_POLLSET_W…
Browse files Browse the repository at this point in the history
…AKEABLE.

Follow up to r1916925 and r1916926.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916929 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ylavic committed Apr 12, 2024
1 parent d010a86 commit 6ed524d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion server/mpm/event/event.c
Expand Up @@ -2628,7 +2628,10 @@ static void setup_threads_runtime(void)
clean_child_exit(APEXIT_CHILDFATAL);
}

/* Create the main pollset */
/* Create the main pollset. When APR_POLLSET_WAKEABLE is asked we account
* for the wakeup pipe explicitely with pollset_size+1 because some pollset
* implementations don't do it implicitely in APR.
*/
pollset_flags = APR_POLLSET_THREADSAFE | APR_POLLSET_NOCOPY |
APR_POLLSET_WAKEABLE | APR_POLLSET_NODEFAULT;
for (i = 0; i < sizeof(good_methods) / sizeof(good_methods[0]); i++) {
Expand Down
5 changes: 4 additions & 1 deletion server/mpm/worker/worker.c
Expand Up @@ -909,7 +909,10 @@ static void setup_threads_runtime(void)
clean_child_exit(APEXIT_CHILDFATAL);
}

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

0 comments on commit 6ed524d

Please sign in to comment.