From 02346abc32a3995299fa9c2f35b9f0a1d091b045 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 29 Jul 2019 13:41:00 +0200 Subject: curl_multi_poll: a sister to curl_multi_wait() that waits more 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. Closes #4163 --- docs/libcurl/Makefile.inc | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/libcurl/Makefile.inc') diff --git a/docs/libcurl/Makefile.inc b/docs/libcurl/Makefile.inc index b4ff45dde..bd88c9c38 100644 --- a/docs/libcurl/Makefile.inc +++ b/docs/libcurl/Makefile.inc @@ -46,6 +46,7 @@ man_MANS = \ curl_multi_info_read.3 \ curl_multi_init.3 \ curl_multi_perform.3 \ + curl_multi_poll.3 \ curl_multi_remove_handle.3 \ curl_multi_setopt.3 \ curl_multi_socket.3 \ -- cgit v1.2.3