feat: initial multithreaded downloading

This commit is contained in:
yuhuihuang
2020-08-22 21:33:10 +08:00
parent 8108f11c45
commit 4715a95a54
3 changed files with 104 additions and 29 deletions

View File

@@ -109,7 +109,7 @@ public final class LauncherHelper {
try {
checkGameState(profile, setting, version, () -> {
Controllers.dialog(launchingStepsPane);
Schedulers.newThread().execute(this::launch0);
Schedulers.defaultScheduler().execute(this::launch0);
});
} catch (InterruptedException | RejectedExecutionException ignore) {
}
@@ -199,7 +199,7 @@ public final class LauncherHelper {
Controllers.dialog(i18n("version.launch_script.success", scriptFile.getAbsolutePath()));
});
}
}).thenRunAsync(Schedulers.defaultScheduler(), () -> {
}).thenRunAsync(() -> {
launchingLatch.await();
}).withStage("launch.state.waiting_launching"))
.withStagesHint(Lang.immutableListOf(