Skip to content
Permalink
Browse files

Limit expression thread count to processor count.

  • Loading branch information
octylFractal committed Oct 26, 2019
1 parent b0528f1 commit fa42e4028189c8a4fb1ac80d9db30368de4c700b
@@ -74,11 +74,12 @@
public class Expression {

private static final ThreadLocal<Stack<Expression>> instance = new ThreadLocal<>();
private static final ExecutorService evalThread = Executors.newCachedThreadPool(
new ThreadFactoryBuilder()
.setDaemon(true)
.setNameFormat("worldedit-expression-eval-%d")
.build());
private static final ExecutorService evalThread = Executors.newFixedThreadPool(
Runtime.getRuntime().availableProcessors(),
new ThreadFactoryBuilder()
.setDaemon(true)
.setNameFormat("worldedit-expression-eval-%d")
.build());

private final SlotTable slots = new SlotTable();
private final List<String> providedSlots;

0 comments on commit fa42e40

Please sign in to comment.
You can’t perform that action at this time.