• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Techniques for limiting concurrent downloads via NSURLSession
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Techniques for limiting concurrent downloads via NSURLSession


  • Subject: Techniques for limiting concurrent downloads via NSURLSession
  • From: Rick Mann <email@hidden>
  • Date: Wed, 29 Jul 2015 16:46:37 -0700

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
email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Techniques for limiting concurrent downloads via NSURLSession
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Regarding these Olivia messages. Can we do something about the list security?
  • Next by Date: Gatekeeper bug? [was Re: Codesigning issues]
  • Previous by thread: Seeking advice for a stream merge type application
  • Next by thread: Re: Techniques for limiting concurrent downloads via NSURLSession
  • Index(es):
    • Date
    • Thread