Make thread pool configurable

This commit is contained in:
2020-05-18 15:34:43 +03:00
parent b435696385
commit 8b5121d5fb
4 changed files with 42 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ public class EffExecuteStatement extends Delay {
static String lastError;
private static final ExecutorService threadPool =
Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
Executors.newFixedThreadPool(SkriptDB.getInstance().getConfig().getInt("thread-pool-size"));
private Expression<String> query;
private Expression<HikariDataSource> dataSource;