You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the system resumes or relaunches your app, it uses a rate limiter to prevent abuse of background downloads. When your app starts a new download task while in the background, the task doesn't begin until the delay expires. The delay increases each time the system resumes or relaunches your app.
As a result, if your app starts a single background download, gets resumed when the download completes, and then starts a new download, it will greatly increase the delay. Instead, use a small number of background sessions — ideally just one — and use these sessions to start many download tasks at once. This allows the system to perform multiple downloads at once, and resume your app when they have completed.
Keep in mind, though, that each task has its own overhead. If you find you need to launch thousands of download tasks, change your design to perform fewer, larger transfers.
Note
The delay is reset to 0 whenever the user brings your app to the foreground. It also resets if the delay period elapses without the system resuming or relaunching your app.
问题1:下载的任务是大量小的且有依赖性的,例:A>B>C>D; 创建后台下载任务A,当A任务在后台完成下载后,是否可以创建新的后台下载任务B? (尝试这样做后发现新的后台下载任务B启动下载的时机不确定,不是立刻而是一段时间后)。
问题2:如果不可以后台下载完成后再创建新的后台任务,那么在前台时需要把所有的后台下载任务先创建出来,上限是多少?
The text was updated successfully, but these errors were encountered: