curl-library
Re: CURL multi handle with easy handles from different threads
Date: Fri, 10 Jul 2015 09:17:02 -0700
My approach has generally been to have one thread that does
curl_multi_perform that also selects on a pipe so it can wake up when
requests need to be added to the multi handle.
Anders
On Fri, Jul 10, 2015 at 2:38 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Fri, 10 Jul 2015, Ray Satiro via curl-library wrote:
>
>> Generally there is something in libcurl I'm unclear about (I've asked on
>> the list before but didn't get a reply addressing it) which is it seems that
>> it's acceptable behavior for curl_multi_perform to always be performing and
>> not return for extended periods of time and I thought in that case you can't
>> call multi_add_handle from another thread during that time.
>
>
> There's no guarantee that this will work. As all internals are lock-free and
> assume exclusive access to lists etc there's a risk for data corruption if
> you do this.
>
> --
>
> / daniel.haxx.se
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
-- Anders Bakken - Netflix ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2015-07-10