-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only one download success when add urls in for loop #21
Comments
Thanks for the report. I am investigating on this. I see no reason but I'll tell you if I find anything. |
Later on that day, a friend told me comment the timer code in method
|
Yeah I understood that. |
I'm seeing this as well. It's not consistently the first download, but that's the highest probability. I've been adding 5 items in a loop, and anywhere from 1 to all 5 of the items will be downloaded. Commenting out the speed timer appears to avoid the issue. In most cases, only one operation is invoked however. At the time of the issue, I had the operation queue set to 1 concurrent operation. The start method is not invoked on subsequent operations. Adding small delays to the invocation of the block syntax variant of
didn't change the behaviour (where the small delay was invoking it asynchronously on the main thread via GCD - in 5 separate blocks, or via a custom serial dispatch queue). I haven't had a chance to dig into the code to see why removing the timer works, I'm on a bit of a deadline at the moment and I don't need the speed details right now. |
Thank you, it helps. I've been digging two weeks ago but I'm not done, and I don't have time those days. This is bothering me, I will take a look at it again. |
I just pushed a fix (3674251) after investigating this afternoon, seeing your issue, seeing that the concurrent downloads were broken etc... I tested it (the NSRunLoop timer thing is still there) and I can now download 50 video files concurrently without issues. I also tested it with 1000 downloads of the master.zip archive of this GitHub repository, one by one, no troubles. (each one in a separated file though, as the library requires) Can you test it? |
Sure. I'll have a chance to test it tomorrow (in about 28 hours from now). |
So far so good. I've downloaded a couple of dozen items with 3 concurrent and it's been working without a problem. |
Alright, perfect then! I updated TCBlobDownload to Thanks |
Will do. I'll switch across to using that version in a few minutes. It'll be getting a bit of testing from the team over the next day or so. Will let you know if anything pops up. |
I have many files to downloa. Many of them are mp3 file with size 200KB
500KB,and several video with size 10MB40MB. So I code like this :But I find only one or two log printed out from
download:didReceiveFirstResponse
delegate. All other files all not download. Finaly, a friend told me to comment the codein method
- (void)start
in fileTCBlobDownload
, then download queue will be normal. I try and it indeed works. But I don't and stand why, so my friend too. May you explain this ?The text was updated successfully, but these errors were encountered: