2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-23 04:28:01 +00:00

Limit RedisBungee thread pool to 32 threads

Closes #27
This commit is contained in:
Tux 2016-06-24 14:10:40 -04:00
parent 436949b8d8
commit f6412b7517

View File

@ -31,6 +31,7 @@ import java.util.*;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask; import java.util.concurrent.FutureTask;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level; import java.util.logging.Level;
@ -235,6 +236,7 @@ public final class RedisBungee extends Plugin {
@Override @Override
public void onEnable() { public void onEnable() {
((ThreadPoolExecutor) getExecutorService()).setMaximumPoolSize(32);
try { try {
loadConfig(); loadConfig();
} catch (IOException e) { } catch (IOException e) {