Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 16:40:10 +01:00
Fixed high CPU usage on Java 8 (#3325)
Fixed https://bugs.openjdk.java.net/browse/JDK-8129861 by setting the core size of the TaskScheduler ThreadPool to 1
Dieser Commit ist enthalten in:
Ursprung
ed55bccfe4
Commit
5c145d0184
@ -29,7 +29,7 @@ public final class TaskScheduler implements Scheduler {
|
|||||||
|
|
||||||
private final ExecutorService executorService = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("Via Async Task %d").build());
|
private final ExecutorService executorService = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("Via Async Task %d").build());
|
||||||
private final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(
|
private final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(
|
||||||
0,
|
1, // Fix for https://bugs.openjdk.java.net/browse/JDK-8129861
|
||||||
new ThreadFactoryBuilder().setNameFormat("Via Async Scheduler %d").build()
|
new ThreadFactoryBuilder().setNameFormat("Via Async Scheduler %d").build()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren