cURL / Mailing Lists / curl-library / Single Mail

curl-library

Simultaneous requests in multi-threaded application

From: Athari <athari.p_at_googlemail.com>
Date: Mon, 31 Mar 2008 16:52:24 +0400

Hello,

I am developing a crawler which will download files simultaneously, and
users need to be able to control each thread, i.e. abort, pause (?), see
progress. DNS cache and cookies need to be shared between the handles, and
cookies need to be preserved between program runs. What is the most
adequate (read: easy) way to do this?

At first I thought to create necessary number of easy cURL handles sharing
data using share interface, but this way I will not be able to control
downloads. Plus, I did not understand when CURLSHOPT_LOCKFUNC is needed -
only when I use a share handle from multiple threads, or when multiple easy
handles are used simultaneously?

I have read the documentation and searched the archives, but have not found
the answer to my question. I have little practice with multi-threaded
applications, maybe that is the primary source of the problem...

P.S. Sorry for possible mistakes in my English, my native language is C++.

-- 
Best regards,
 Athari mailto:athari.p@gmail.com, http://snowlands.ru/en/
Received on 2008-03-31