cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [SAD TRUTH] does curl_multi handle can be accessed from 2 threads?

From: Richard Atterer <richard_at_2006.atterer.net>
Date: Tue, 5 Sep 2006 17:28:35 +0200

On Tue, Sep 05, 2006 at 05:17:50PM +0200, Richard Atterer wrote:
> ISTR you can set a timeout to avoid the case that all curl-multi file
> descriptors are waiting for data. Is it
> curl_easy_setopt(CURLOPT_TIMEOUT)? Then you can call curl_multi_perform()
> in a loop and also release the lock between these calls.

Er, nonsense... since you call select() yourself, you can leave the lock
unlocked during the call, and only take it immediately before you call
curl_multi_perform(). Actually, it's probably not necessary to release the
lock from within the callback because the data will be processed pretty
quickly by libcurl.

  Richard

-- 
Richard Atterer
Raum 503, Amalienstraße 17 5.OG, Fon 089/2180-4654, Fax 089/2180-994654,
Medieninformatik, LMU München: http://www.medien.ifi.lmu.de
Received on 2006-09-05