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

Fix #8: Race condition in FSNConnection #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

braintreeps
Copy link

We believe that #8 is caused by a race between a failing parse block in the background thread and a background task expiration triggered by UIKit.

In the event that this happens, an assertion exception is not appropriate. The user will not be able to catch this exception in a reasonable way, and the user will typically prefer to be notified of at least one error via c.error in the completion block.

@gwk, does this seem reasonable to you? We are hoping this will help us with this issue.

Don't throw an assertion exception in the event of race condition on failWithError:.
@gwk
Copy link
Contributor

gwk commented Jan 9, 2014

first of all, thanks for pursuing the issue. i think your reasoning about the problem is sound, but simply disabling the assertion hides the deeper problem. i have pushed a more involved patch to my fork, and i would appreciate a review.

@itsbonczek, @adamalix, would you guys mind taking a look at this as well? thanks! -george

gwk@9cbe3d4

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.

2 participants