curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: can't go ahead if event isn't finished in libevent

From: Pahome Chen via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 2 May 2017 09:58:28 +0800

I thought it will call multi_timer_cb when called curl_multi_add_handle
immediately like below:

  rc = curl_multi_add_handle
<https://curl.haxx.se/libcurl/c/curl_multi_add_handle.html>(g->multi,
conn->easy);
  mcode_or_die(*"new_conn: curl_multi_add_handle"*, rc);

  */* note that the add_handle() will set a time-out to trigger very soon so
     that the necessary socket_action() call will be called by this app */ *

so socket_action() will wait for exiting event loop in a blocking way?

2017-04-30 23:59 GMT+08:00 Daniel Stenberg <daniel_at_haxx.se>:

> On Fri, 28 Apr 2017, Pahome Chen via curl-library wrote:
>
> The *sock_cb* will not work when I add *while(1);* in the last of *fifo_cb
>> (*block *fifo_cb* in other words*).*
>>
>
> Right, because how could it? The entire hiperfifo program runs in a single
> thread. If you block a function and never return from it, the entire thread
> will continue executing in that loop.
>
> --
>
> / daniel.haxx.se
>

-- 
Best Regards,
pahome

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-05-02