Fix the dead thread bug on iOS 5 (fix #466)
This commit is contained in:
parent
5f12cabdac
commit
4540745382
|
@ -71,7 +71,9 @@
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStartNotification object:self];
|
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStartNotification object:self];
|
||||||
|
|
||||||
// Make sure to run the runloop in our background thread so it can process downloaded data
|
// Make sure to run the runloop in our background thread so it can process downloaded data
|
||||||
CFRunLoopRun();
|
// Note: we use a timeout to work around an issue with NSURLConnection cancel under iOS 5
|
||||||
|
// not waking up the runloop, leading to dead threads (see https://github.com/rs/SDWebImage/issues/466)
|
||||||
|
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 10, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue