Skip to content
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

Fixing race in SDWebImageDownloaderOperation leading to erroneous timeout. #698

Merged
merged 1 commit into from
Apr 22, 2014
Merged

Conversation

salling
Copy link
Contributor

@salling salling commented Apr 22, 2014

In some cases, SDWebImage will erroneously report timeout for an image download. This is due to a race condition introduced through -performSelector:onThread:withObject:waitUntilDone:, which causes cancellation of a download operation to stop the run loop that is now used for another download operation.

Fixing race condition that causes cancellation of one download operation to stop a run loop that is now used for another download operation. Race is introduced through -performSelector:onThread:withObject:waitUntilDone:
@salling salling changed the title Update SDWebImageDownloaderOperation.m Fixing race in SDWebImageDownloaderOperation leading to erroneous timeout. Apr 22, 2014
rs pushed a commit that referenced this pull request Apr 22, 2014
Fixing race in SDWebImageDownloaderOperation leading to erroneous timeout.
@rs rs merged commit c9a24e2 into SDWebImage:master Apr 22, 2014
@swizzlr
Copy link

swizzlr commented May 6, 2014

@salling I'm using your patch but sometimes still seeing it happen. How could we make the architecture more capable of handling this? Refactor to use dispatch_queues and one run loop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants