[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 13/13: Officially support zero for MHD_OPTION_THREAD_POO
From: |
gnunet |
Subject: |
[libmicrohttpd] 13/13: Officially support zero for MHD_OPTION_THREAD_POOL_SIZE |
Date: |
Thu, 23 Nov 2023 11:49:16 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit a19df909da3adad4dc78dd086e315ad005c484bf
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu Nov 23 11:27:03 2023 +0300
Officially support zero for MHD_OPTION_THREAD_POOL_SIZE
---
src/include/microhttpd.h | 7 +++----
src/microhttpd/daemon.c | 10 +++-------
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 13bd2cbf..0c11d308 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -1817,10 +1817,9 @@ enum MHD_OPTION
/**
* Number (`unsigned int`) of threads in thread pool. Enable
* thread pooling by setting this value to to something
- * greater than 1. Currently, thread mode must be
- * #MHD_USE_INTERNAL_POLLING_THREAD if thread pooling is enabled
- * (#MHD_start_daemon returns NULL for an unsupported thread
- * mode).
+ * greater than 1.
+ * Can be used only for daemons started with
#MHD_USE_INTERNAL_POLLING_THREAD.
+ * Ignored if followed by zero value.
*/
MHD_OPTION_THREAD_POOL_SIZE = 14,
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 27cf3534..688d829d 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -6735,18 +6735,14 @@ parse_options_va (struct MHD_Daemon *daemon,
unsigned int);
if (0 == daemon->worker_pool_size)
{
-#ifdef HAVE_MESSAGES
- MHD_DLOG (daemon,
- _ ("Warning: Zero size, specified for thread pool size," \
- " is ignored. Thread pool is not used.\n"));
-#endif
+ (void) 0; /* MHD_OPTION_THREAD_POOL_SIZE ignored, do nothing */
}
else if (1 == daemon->worker_pool_size)
{
#ifdef HAVE_MESSAGES
MHD_DLOG (daemon,
- _ ("Warning: \"1\", specified for thread pool size, " \
- "is ignored. Thread pool is not used.\n"));
+ _ ("Warning: value \"1\", specified as the thread pool " \
+ "size, is ignored. Thread pool is not used.\n"));
#endif
daemon->worker_pool_size = 0;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (cd4d2f65 -> a19df909), gnunet, 2023/11/23
- [libmicrohttpd] 03/13: MHD_start_daemon(): moved daemon flags internal initialisation, gnunet, 2023/11/23
- [libmicrohttpd] 01/13: Added detection of more conditions to process the data without waiting, gnunet, 2023/11/23
- [libmicrohttpd] 04/13: MHD_start_daemon(): reject INTERNAL_POLLING_THREAD if threads are disabled, gnunet, 2023/11/23
- [libmicrohttpd] 02/13: MHD_quiesce_daemon(): fixed return value if already quiesced, gnunet, 2023/11/23
- [libmicrohttpd] 05/13: Moved user options counter to shorter its lifetime, gnunet, 2023/11/23
- [libmicrohttpd] 06/13: test_daemon: fixed to not skip if failed, gnunet, 2023/11/23
- [libmicrohttpd] 08/13: Improved daemon shutdown handling in external polling mode, gnunet, 2023/11/23
- [libmicrohttpd] 07/13: test_digestauth2: fixed order of the initial checks, gnunet, 2023/11/23
- [libmicrohttpd] 09/13: Micro-optimisations for non-overridable FD_SETSIZE, gnunet, 2023/11/23
- [libmicrohttpd] 13/13: Officially support zero for MHD_OPTION_THREAD_POOL_SIZE,
gnunet <=
- [libmicrohttpd] 10/13: Unified and simplified fd_set filling, gnunet, 2023/11/23
- [libmicrohttpd] 11/13: Added new daemon flag MHD_USE_NO_THREAD_SAFETY, gnunet, 2023/11/23
- [libmicrohttpd] 12/13: Tests: added use of MHD_USE_NO_THREAD_SAFETY flag, gnunet, 2023/11/23