summaryrefslogtreecommitdiff
path: root/lib/multihandle.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-03-26 17:43:28 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-03-26 17:43:28 +0200
commit843b3baa3e3cb2280064626a530bb9e3e2ccbb9b (patch)
treee6e8eb6226f634d0c5d1c7f7d376a9dfdba426f8 /lib/multihandle.h
parent9d107b6954d5690731f86702105d2e29421f7226 (diff)
downloadcurl-843b3baa3e3cb2280064626a530bb9e3e2ccbb9b.tar.gz
multi: remove PENDING + MSGSENT handles from the main linked list
As they are not driving transfers or any socket activity, the main loop does not need to iterate over these handles. A performance improvement. They are instead only held in their own separate lists. 'data->multi' is kept a pointer to the multi handle as long as the easy handle is actually part of it even when the handle is moved to the pending/msgsent lists. It needs to know which multi handle it belongs to, if for example curl_easy_cleanup() is called before the handle is removed from the multi handle. Alll 'data->multi' pointers of handles still part of the multi handle gets cleared by curl_multi_cleanup() which "orphans" all previously attached easy handles. This is take 2. The first version was reverted for the 8.0.1 release. Assisted-by: Stefan Eissing Closes #10801
Diffstat (limited to 'lib/multihandle.h')
-rw-r--r--lib/multihandle.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/multihandle.h b/lib/multihandle.h
index 6cda65d44..5b16bb605 100644
--- a/lib/multihandle.h
+++ b/lib/multihandle.h
@@ -101,6 +101,8 @@ struct Curl_multi {
struct Curl_llist pending; /* Curl_easys that are in the
MSTATE_PENDING state */
+ struct Curl_llist msgsent; /* Curl_easys that are in the
+ MSTATE_MSGSENT state */
/* callback function and user data pointer for the *socket() API */
curl_socket_callback socket_cb;