Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

artifacts are downloaded serially in a single thread #25

Closed
Eskibear opened this issue Jan 14, 2020 · 0 comments · Fixed by #26
Closed

artifacts are downloaded serially in a single thread #25

Eskibear opened this issue Jan 14, 2020 · 0 comments · Fixed by #26

Comments

@Eskibear
Copy link
Contributor

Take a look at class AetherRepositoryConnector. For each artifact, there's a corresponding GetTask. And since there's a CountDownLatch, I believe the tasks are designed to run in parallel.
But, the code calls Runnable.run() directly, making it mono-threaded, see below:

for (ArtifactDownload download : artifactDownloads) {
String resource = layout.getLocation(download.getArtifact(), false).getPath();
GetTask<?> task = new GetTask<ArtifactTransfer>(resource, download.isExistenceCheck() ? null : download.getFile(), download.getChecksumPolicy(), latch, download, ARTIFACT);
tasks.add(task);
task.run();
}
await(latch);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant