Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-02 17:40:09 +01:00
Limit expression thread count to processor count.
Dieser Commit ist enthalten in:
Ursprung
b0528f157a
Commit
fa42e40281
@ -74,11 +74,12 @@ import java.util.concurrent.TimeoutException;
|
||||
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;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren