|
11 | 11 | import struct TSCUtility.Version
|
12 | 12 | import TSCBasic
|
13 | 13 | import struct PackageModel.PackageReference
|
| 14 | +import Dispatch |
14 | 15 |
|
15 | 16 | /// A term represents a statement about a package that may be true or false.
|
16 | 17 | public struct Term: Equatable, Hashable {
|
@@ -1845,15 +1846,17 @@ private final class ContainerProvider {
|
1845 | 1846 | _prefetchingContainers.insert(identifier)
|
1846 | 1847 |
|
1847 | 1848 | provider.getContainer(for: identifier, skipUpdate: skipUpdate) { container in
|
1848 |
| - self.fetchCondition.whileLocked { |
1849 |
| - // Update the structures and signal any thread waiting |
1850 |
| - // on prefetching to finish. |
1851 |
| - let pubGrubContainer = container.map { |
1852 |
| - PubGrubPackageContainer($0, pinsMap: self.pinsMap) |
| 1849 | + DispatchQueue.global().async { |
| 1850 | + self.fetchCondition.whileLocked { |
| 1851 | + // Update the structures and signal any thread waiting |
| 1852 | + // on prefetching to finish. |
| 1853 | + let pubGrubContainer = container.map { |
| 1854 | + PubGrubPackageContainer($0, pinsMap: self.pinsMap) |
| 1855 | + } |
| 1856 | + self._fetchedContainers[identifier] = pubGrubContainer |
| 1857 | + self._prefetchingContainers.remove(identifier) |
| 1858 | + self.fetchCondition.signal() |
1853 | 1859 | }
|
1854 |
| - self._fetchedContainers[identifier] = pubGrubContainer |
1855 |
| - self._prefetchingContainers.remove(identifier) |
1856 |
| - self.fetchCondition.signal() |
1857 | 1860 | }
|
1858 | 1861 | }
|
1859 | 1862 | }
|
|
0 commit comments