On Fri, 5 Oct 2012, Stef Bon wrote:

The 1 millisecond wait is there to make sure you call curl_multi_socket_action() very soon so that libcurl can take care of actions that it wants to do now. Adding new handles have that effect and then libcurl wants to setup and act on the new handle.

Yes the timeout is 1 millisecond, and it has to be called very soon. Is it a good idea to call it directly in stead of creating a timer, since it's a very short period?

I don't think so.

Why bother with that psuedo-optimization? You will still need the timeout callback for other (longer) timeouts so you still need to have it there and set timeouts. I don't see any point in adding a special-case for the 1 ms timeout.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to