In my application I have to download hundreds to maybe a thousand files for 
each "thing" that gets downloaded. I tried just kicking off a bunch of download 
tasks in a loop, but eventually I either get "Too many open files" errors, or I 
crash (this is on an iPad).

I can think of at least one way to limit this: issue the first N downloads, 
then as each completes, issue another. This requires a bit more bookkeeping, 
but can be doable.

The drawback comes when you want to make them background download sessions to 
be conducted when the app isn't running. It would be nice to set them all up, 
and just let the OS take care of limiting the actual downloads. Not sure this 
is feasible with this many files.

What other techniques do you guys use for this situation?

TIA,

-- 
Rick Mann
rm...@latencyzero.com



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to