-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
the thread block #399
Comments
I am facing the exactly same problem with the lastest release (v3.3) on ios5.0 or ios5.1. It's wired that this problem can't be reproducted on ios6.0 or higher. I stop the app on simulater and find out that there is about 50+ threads pasued on // Make sure to run the runloop in our background thread so it can process downloaded data
CFRunLoopRun(); and dispatch_sync(self.barrierQueue, ^
{
callbacksForURL = self.URLCallbacks[url];
}); |
thans for your reply, it's very usefull. |
but i found in the newest code, it will retain cycle again, in
has no use,it can't break retain cycle |
the newest code #397 is ios5, the thread will go to deadthread |
Does it work better if you replace id operation = blockOperation; by: __weak SDWebImageDownloaderOperation *operation = blockOperation; |
i think it is not the blockOperation cause retain cycle;i down the newest code this time ,and there is my fix code ,hope this will help. in file SDWebImageManager.m -----> downloadWithURL function first: replace all "operation" to "weakOperation"
replace all "subOperation" to "weakSubOperation" so all Code is
{
} but, may be there are some problem, may be the cancle download images operation can't cancel immediately. |
Does this helps ? |
are you running the code in iPhone 5.0 simulator,if you drag to down of the list ,and fast drag to top ,repeate this action, it will happen |
+1 for this issue - |
Please see #466 |
I run the example demo, drag to Down an drag up, the UI thread is blocking,I find it is blocking at the class SDWebImageDownloader,
dispatch_sync(self.barrierQueue OR
dispatch_barrier_sync(self.barrierQueue
I hope it will help, thx
The text was updated successfully, but these errors were encountered: