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.
If an
SQKOperation
is run on the main thread using[operation start]
then there is a possibility of deadlock whendispatch_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.