diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-04-10 19:12:37 +0000 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-04-10 19:12:37 +0000 |
commit | ff21b86d1ae552add51867028d99e13dd0121810 (patch) | |
tree | 20599bc6bd468cdf88cd660411eb4456f135f9f2 /src/microhttpd/internal.h | |
parent | cf295a42e24599a1e4b6e33afa58fa724d40eb76 (diff) | |
download | libmicrohttpd-ff21b86d1ae552add51867028d99e13dd0121810.tar.gz libmicrohttpd-ff21b86d1ae552add51867028d99e13dd0121810.zip |
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().
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r-- | src/microhttpd/internal.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 | |||
976 | * All connections by default start in this list; if a custom | 976 | * All connections by default start in this list; if a custom |
977 | * timeout that does not match @e connection_timeout is set, they | 977 | * timeout that does not match @e connection_timeout is set, they |
978 | * are moved to the @e manual_timeout_head-XDLL. | 978 | * are moved to the @e manual_timeout_head-XDLL. |
979 | * Not used in MHD_USE_THREAD_PER_CONNECTION mode as each thread | ||
980 | * needs only one connection-specific timeout. | ||
979 | */ | 981 | */ |
980 | struct MHD_Connection *normal_timeout_head; | 982 | struct MHD_Connection *normal_timeout_head; |
981 | 983 | ||
982 | /** | 984 | /** |
983 | * Tail of the XDLL of ALL connections with a default timeout, | 985 | * Tail of the XDLL of ALL connections with a default timeout, |
984 | * sorted by timeout (earliest timeout at the tail). | 986 | * sorted by timeout (earliest timeout at the tail). |
987 | * Not used in MHD_USE_THREAD_PER_CONNECTION mode. | ||
985 | */ | 988 | */ |
986 | struct MHD_Connection *normal_timeout_tail; | 989 | struct MHD_Connection *normal_timeout_tail; |
987 | 990 | ||
@@ -989,12 +992,14 @@ struct MHD_Daemon | |||
989 | * Head of the XDLL of ALL connections with a non-default/custom | 992 | * Head of the XDLL of ALL connections with a non-default/custom |
990 | * timeout, unsorted. MHD will do a O(n) scan over this list to | 993 | * timeout, unsorted. MHD will do a O(n) scan over this list to |
991 | * determine the current timeout. | 994 | * determine the current timeout. |
995 | * Not used in MHD_USE_THREAD_PER_CONNECTION mode. | ||
992 | */ | 996 | */ |
993 | struct MHD_Connection *manual_timeout_head; | 997 | struct MHD_Connection *manual_timeout_head; |
994 | 998 | ||
995 | /** | 999 | /** |
996 | * Tail of the XDLL of ALL connections with a non-default/custom | 1000 | * Tail of the XDLL of ALL connections with a non-default/custom |
997 | * timeout, unsorted. | 1001 | * timeout, unsorted. |
1002 | * Not used in MHD_USE_THREAD_PER_CONNECTION mode. | ||
998 | */ | 1003 | */ |
999 | struct MHD_Connection *manual_timeout_tail; | 1004 | struct MHD_Connection *manual_timeout_tail; |
1000 | 1005 | ||