Merge pull request #204 from OlegYch/fix-deadlock

avoid deadlocks on spotty connections
This commit is contained in:
Dale Wijnand 2018-01-18 16:29:07 +00:00 committed by GitHub
commit 2c6e38829f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -38,7 +38,10 @@ private[sbt] class ParallelResolveEngine(settings: ResolveEngineSettings,
val allDownloads = dependencies.par.flatMap { dep =>
if (!(dep.isCompletelyEvicted || dep.hasProblem) &&
dep.getModuleRevision != null) {
ParArray(downloadNodeArtifacts(dep, artifactFilter, options))
//don't block in global ec to avoid deadlocks
scala.concurrent.blocking {
ParArray(downloadNodeArtifacts(dep, artifactFilter, options))
}
} else ParArray.empty[DownloadResult]
}