On Sun, Dec 18, 2011 at 11:12 PM, Daniel Stenberg <[email protected]> wrote: > On Sun, 18 Dec 2011, Pedro Larroy wrote: > I don't understand. That backtrace shows libcurl doing a poll() on a socket, > yes and when the multi_socket API is used we should be able to do without > it. We should fix that and we'll appreciate a patch that makes it work > without the superfluous Curl_poll() call.. > > You said it "just polls waiting for DNS queries to finish" and I don't see > how your backtrace shows this. Can you perhaps explain with a few words what > I'm not seeing? >
(lib/asyn-ares.c:288) My interpretation is that there's this poll call waiting for the dns query to finish in the ares_channel associated with the current curl_handle thus: * It will block the whole program until the current dns reply is recieved, which goes against the paradigm of the multi interface usage with asynchronous IO. * If that wasn't bad enough, the select has a timeout of 0. * I have already observed degradation and blocking which was very detrimental and tracked down to this. I think it's going to be difficult to fix since the multi api exposes one socket perl curl handle, so it would have to expose all the sockets of the dns resolution per handle to function properly, which seems not trivial. Regards. Pedro. ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
