]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
mpm_winnt: Tweak the listener shutdown code to use a separate event
authorEvgeny Kotkov <kotkov@apache.org>
Wed, 12 Jul 2017 16:02:39 +0000 (16:02 +0000)
committerEvgeny Kotkov <kotkov@apache.org>
Wed, 12 Jul 2017 16:02:39 +0000 (16:02 +0000)
commit0c496a080bf2536a8b04d42097ba4bcf62de1dd4
tree4905eff94b18f1565d2323a101924e99b3c3a691
parent081a04cfba74952b06fe6ed92a1a34833bc7ad58
mpm_winnt: Tweak the listener shutdown code to use a separate event
instead of the global variable (shutdown_in_progress).

This change has two purposes.  First of all, it makes the listener threads
which are blocked waiting for a completion context exit immediately during
shutdown.  Previously, such threads would only check for exit every second.
The second reason for this change is to put the child_main() function in
charge of controlling the listeners life cycle.  Previously, such relation
was circumvented by the fact that the listeners were also waiting for the
global child exit_event.  With the new separate listener_shutdown_event,
only the child_main() function is responsible for shutting down the
listeners, and I think that this makes the code a bit clearer.

All the original behavior, including the special APLOG_DEBUG diagnostic
message when we fail to acquire a free completion context in 1 second,
is kept unchanged.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1801747 13f79535-47bb-0310-9956-ffa450edef68
docs/log-message-tags/next-number
server/mpm/winnt/child.c