mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Limit expression thread count to processor count.
This commit is contained in:
parent
b0528f157a
commit
fa42e40281
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user