Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Comments

Prevent deadlock when the operation is being run on the main thread#82

Open
blork wants to merge 1 commit intomasterfrom
test_run_deadlock
Open

Prevent deadlock when the operation is being run on the main thread#82
blork wants to merge 1 commit intomasterfrom
test_run_deadlock

Conversation

@blork
Copy link
Contributor

@blork blork commented May 3, 2016

If an SQKOperation is run on the main thread using [operation start] then there is a possibility of deadlock when dispatch_async(dispatch_get_main_queue(), ...) is used. This change checks the current queue and conditionally executes the merge block on the appropriate one.

In production code this doesn't happen, since operations are usually run on a background queue. When running tests it is much more likely. This should fix some issues that break test runs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant