From ff21b86d1ae552add51867028d99e13dd0121810 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Sun, 10 Apr 2016 19:12:37 +0000 Subject: Use less locking with MHD_USE_THREAD_PER_CONNECTION. Do not maintain global list out timeouts as each thread use individual timeout. As result - global mutex is not acquired after each single send()/recv(). --- src/microhttpd/internal.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/microhttpd/internal.h') diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index 3856a623..58317040 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h @@ -976,12 +976,15 @@ struct MHD_Daemon * All connections by default start in this list; if a custom * timeout that does not match @e connection_timeout is set, they * are moved to the @e manual_timeout_head-XDLL. + * Not used in MHD_USE_THREAD_PER_CONNECTION mode as each thread + * needs only one connection-specific timeout. */ struct MHD_Connection *normal_timeout_head; /** * Tail of the XDLL of ALL connections with a default timeout, * sorted by timeout (earliest timeout at the tail). + * Not used in MHD_USE_THREAD_PER_CONNECTION mode. */ struct MHD_Connection *normal_timeout_tail; @@ -989,12 +992,14 @@ struct MHD_Daemon * Head of the XDLL of ALL connections with a non-default/custom * timeout, unsorted. MHD will do a O(n) scan over this list to * determine the current timeout. + * Not used in MHD_USE_THREAD_PER_CONNECTION mode. */ struct MHD_Connection *manual_timeout_head; /** * Tail of the XDLL of ALL connections with a non-default/custom * timeout, unsorted. + * Not used in MHD_USE_THREAD_PER_CONNECTION mode. */ struct MHD_Connection *manual_timeout_tail; -- cgit v1.2.3