Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PubGrub] Fix a potential deadlock when prefetching
The prefetching logic had a bug which sometimes leads to deadlock if prefetched container queries start calling the completion block while the main resolution logic is trying to fetch a new container that is NOT in the prefetching list (because it's new dependency). The main reason for this is that the container provider is using a serial queue for callbacks (which is questionable) but it's better to not make any assumptions about the provider and never run potentially blocking code in the compleition handler. Unfortunately, this is proving hard to unit test because this depends on network speed/latency etc. <rdar://problem/58644686>
- Loading branch information