summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-07-29 13:41:00 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-07-30 23:21:12 +0200
commit625f006cee8356eac743e5a577b3fd6e50390222 (patch)
treeed5a887df13ff55621794d35f3a274ad520dd7bf /tests
parent62aa0ba91ab0ede286cb41eed0b215705a5b1c90 (diff)
downloadcurl-625f006cee8356eac743e5a577b3fd6e50390222.tar.gz
curl_multi_poll: a sister to curl_multi_wait() that waits morebagder/curl_multi_poll
Repeatedly we see problems where using curl_multi_wait() is difficult or just awkward because if it has no file descriptor to wait for internally, it returns immediately and leaves it to the caller to wait for a small amount of time in order to avoid occasional busy-looping. This is often missed or misunderstood, leading to underperforming applications. This change introduces curl_multi_poll() as a replacement drop-in function that accepts the exact same set of arguments. This function works identically to curl_multi_wait() - EXCEPT - for the case when there's nothing to wait for internally, as then this function will by itself wait for a "suitable" short time before it returns. This effectiely avoids all risks of busy-looping and should also make it less likely that apps "over-wait". This also changes the curl tool to use this funtion internally when doing parallel transfers and changes curl_easy_perform() to use it internally.
Diffstat (limited to 'tests')
-rw-r--r--tests/data/test11351
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/data/test1135 b/tests/data/test1135
index 3591a543b..eca6860fb 100644
--- a/tests/data/test1135
+++ b/tests/data/test1135
@@ -91,6 +91,7 @@ CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
+CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle,
CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle,