cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Feature Requests-2100889 ] Limit simultaneous downloads through multi interface

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 12 Sep 2008 07:08:45 +0000

Feature Requests item #2100889, was opened at 2008-09-08 15:45
Message generated for change (Comment added) made by robert_banfield
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=350976&aid=2100889&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: None
Status: Open
Resolution: None
Priority: 2
Private: No
Submitted By: robert_banfield (robert_banfield)
Assigned to: Daniel Stenberg (bagder)
Summary: Limit simultaneous downloads through multi interface

Initial Comment:
Currently after adding handles to the multi interface, libcurl will attempt to perform them all in parallel when curl_multi_perform is called, regardless of how many requests have been added. I suggest an addition to curl_multi_setopt which will limit the number of simultaneous requests executed.

----------------------------------------------------------------------

>Comment By: robert_banfield (robert_banfield)
Date: 2008-09-12 02:08

Message:
By allowing such an option, a queue for active requests versus queued
requests is not necessary to implement on the part of the person using
libcurl. The lack of this option does not prevent the use of libcurl, it
just adds a little bit more simplicity in its use.

Consider, a multi-threaded process, one process which generates requests,
and another which services requests. In the first thread, it would be nice
just to call curl_multi_add_handle(...) while another thread is
continuously executing. In the current system, I would make a transfer
request queue, from which the second process consumes and services.

In a single process wanting to generate requests as it services them, it
simplifies the code: first banging through all the curl_multi_add_handles,
then just hitting the curl_multi_perform. Currently, I would use a queue
of active/pending requests, or alternatively a loop for each request (but
w/o the queue couldnt generate the next request until the desired number of
simultaneous threads was reduced).

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2008-09-08 17:45

Message:
I don't see the point in that. Why don't you just instead not add more
handles than what you want transferred simultaneously?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=350976&aid=2100889&group_id=976
Received on 2008-09-12

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET