mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
use the default HttpClient executor in DependencyDownloader
(HttpClient *really* doesn't want to be used synchronously) by reusing the HttpClient we still avoid redundant threads, we just can't reuse the thread making the request for handling it
This commit is contained in:
1 file changed
+1
-4
@@ -67,10 +67,7 @@ public final class DependencyDownloader {
|
||||
) {
|
||||
this.logger = logger;
|
||||
this.cacheDir = cacheDir;
|
||||
this.client = HttpClient.newBuilder()
|
||||
// using a cached thread pool (default) is completely redundant with how we use the client
|
||||
.executor(Runnable::run)
|
||||
.build();
|
||||
this.client = HttpClient.newHttpClient();
|
||||
}
|
||||
|
||||
public Set<Path> resolve() {
|
||||
|
||||
Reference in new issue
Block a user