summaryrefslogtreecommitdiff
path: root/include/mpm_common.h
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2022-02-24 11:53:53 +0000
committerStefan Eissing <icing@apache.org>2022-02-24 11:53:53 +0000
commit2e239ed8e65a0a7cc5f12d64b4d21cc92ab08709 (patch)
treeedbc212c0d79ec080b86549310bd4cca55ef4a5b /include/mpm_common.h
parent80a4538022762794dc9e04dd5886a9bfce61418d (diff)
downloadhttpd-2e239ed8e65a0a7cc5f12d64b4d21cc92ab08709.tar.gz
* core/mpm: add hook 'child_stopped` that gets called when the MPM has
stopped all processing in a child process. This is when all running threads shall be stopped and joined. [Stefan Eissing] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898369 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/mpm_common.h')
-rw-r--r--include/mpm_common.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/include/mpm_common.h b/include/mpm_common.h
index 007a24a498..334624ee06 100644
--- a/include/mpm_common.h
+++ b/include/mpm_common.h
@@ -512,14 +512,30 @@ AP_DECLARE_HOOK(void, resume_connection,
(conn_rec *c, request_rec *r))
/**
- * Notification that the child is stopping. If graceful, ongoing
- * requests will be served.
+ * Notification that the child is stopping. No new requests
+ * or other tasks to be started.
+ * If graceful, already started requests/tasks should be
+ * processed normally.
* @param pchild The child pool
* @param graceful != 0 iff this is a graceful shutdown.
*/
AP_DECLARE_HOOK(void, child_stopping,
(apr_pool_t *pchild, int graceful))
+/**
+ * Notification that the child has stopped processing
+ * requests completely. Any running threads should be
+ * shut down now.
+ * Ideally, when this hook completes, no more threads
+ * are running in the child process.
+ * Note that de-allocation of global resources should
+ * be run via memory pool destroy callback after this.
+ * @param pchild The child pool
+ * @param graceful != 0 iff this is a graceful shutdown.
+ */
+AP_DECLARE_HOOK(void, child_stopped,
+ (apr_pool_t *pchild, int graceful))
+
/* mutex type string for accept mutex, if any; MPMs should use the
* same mutex type for ease of configuration
*/