Err, it turns out this is not a bug of libcurl.It's because our usage
is wrong. Our currently loop is like this:

while 1:
    process shared request queue, add them to multi handle.
    select with fdset
    multi_perform
    process multi->msglist

Because select is called before multi_perform, so we blocked on
select. Now we've changed that like follow, and problem vanished.

while 1:
    select with fdset including an eventfd which used to notify new requests.
    process shared request queue, add them to multi handle.
    multi_perform
    process multi->msglist

I hope we can add an example loop to the multi api tutorial, then
people won't make this mistake like me.
Thanks for your reply and apologies for wasting your time ;D


On Fri, Aug 23, 2013 at 10:17 AM, yi huang <[email protected]> wrote:
> Sorry for the slow reply, my colleague was working on this, but he's
> been attacked to other things , i will reply with the result ASAP.
>
> On Fri, Aug 23, 2013 at 4:57 AM, Daniel Stenberg <[email protected]> wrote:
>> On Wed, 21 Aug 2013, Daniel Stenberg wrote:
>>
>>> I've attached my suggested fix for this. Can you try it out and see if
>>> that alone perhaps fixes your problem?
>>
>>
>> I consider the change a good fix anyway so I've pushed it already to git, in
>> case you prefer testing a plain git version...
>>
>> --
>>
>>  / daniel.haxx.se
>> -------------------------------------------------------------------
>> List admin: http://cool.haxx.se/list/listinfo/curl-library
>> Etiquette:  http://curl.haxx.se/mail/etiquette.html
>
>
>
> --
> http://yi-programmer.com/



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

Reply via email to