8000 Prevent deadlock when the operation is being run on the main thread by blork · Pull Request #82 · 3Squared/SQKDataKit · GitHub
[go: up one dir, main page]

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

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.

2 participants

0