curl-library
Re: cpu usage during CURLOPT_CONNECTTIMEOUT_MS/CURLOPT_TIMEOUT_MSū
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 6 Feb 2011 09:10:09 +0100 (CET)
Date: Sun, 6 Feb 2011 09:10:09 +0100 (CET)
On Sat, 5 Feb 2011, CHENG LIANG wrote:
> When I use the options CURLOPT_CONNECTTIMEOUT_MS/CURLOPT_TIMEOUT_MSū, during
> the period of wating for timeout or response from server, does curl code
> still use/lock the cpu during that period?
If you're asking if libcurl will busy-wait, the answer is no. It will
basically spend most of its time doing select() (or poll()) waiting for
something to happen on the socket.
-- / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-06