Limit expression thread count to processor count.

Dieser Commit ist enthalten in:
Kenzie Togami 2019-10-26 16:44:23 -07:00
Ursprung b0528f157a
Commit fa42e40281
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 5D200B325E157A81

Datei anzeigen

@ -74,7 +74,8 @@ import java.util.concurrent.TimeoutException;
public class Expression {
private static final ThreadLocal<Stack<Expression>> instance = new ThreadLocal<>();
private static final ExecutorService evalThread = Executors.newCachedThreadPool(
private static final ExecutorService evalThread = Executors.newFixedThreadPool(
Runtime.getRuntime().availableProcessors(),
new ThreadFactoryBuilder()
.setDaemon(true)
.setNameFormat("worldedit-expression-eval-%d")