Den mån 5 apr. 2021 kl 22:43 skrev Daniel Stenberg <dan...@haxx.se>:
> On Mon, 5 Apr 2021, Henrik Holst wrote: > > > And this particular run with 1ms did not lead to 100% cpu, it was when > curl > > gave me 0ms as timeout as the last timeout which lead me to call > > curl_multi_socket_action() every 0ms, which turned it into a busy wait > loop > > and hence the 100% cpu. Shouldn't curl return -1 as infinte timeout > instead > > there since it's waiting for read on a connected socket (after having > sent > > the request in full) with no defined CURLOPT_TIMEOUT? > > 0 means that there's a timeout pending that libcurl wants to take care of > at > once so then it can't return -1 since -1 means no timeout at all. > > So no, it cannot return -1 when it means 0. > Yeah, it turned out that my whole problem was that i misread the docs "non-repeating timer" as "repeating timer" and that was the whole basis for my confusion. Sorry for this. /HH > > -- > > / daniel.haxx.se > | Commercial curl support up to 24x7 is available! > | Private help, bug fixes, support, ports, new features > | https://www.wolfssl.com/contact/ >
------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html