Conversation
| self.pendingFetchesDispatchQueue.sync(flags: .barrier) { [weak self] in | ||
| guard let self = self else { return } | ||
| self.pendingFetches.removeValue(forKey: groupID) | ||
| } |
There was a problem hiding this comment.
I'm not too familiar with how sync() and group.notify() work, but is it possible this could cause some sort of deadlock on the main queue? From the docs on DispatchQueue:
Attempting to synchronously execute a work item on the main queue results in deadlock.
(I used a slightly different approach for wrapping this call in #80.)
There was a problem hiding this comment.
I'm not sure either. I'll take a look at your change. It might be the way to go.
There was a problem hiding this comment.
I closed the pull request already, but feel free to reopen it.
There was a problem hiding this comment.
I cannot speak into the possibility of deadlock here but this is working great for me
|
Is this stale or ready to be merged into master? |
Wrap other cases where we mutate the pendingFetches array in the barrier queue.
Include fix to not release the DispatchQueue for tile image fetches.