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

Change thread pool from fixed size of 16 threads to a cached one.

RedisBungee's operations aren't particularly long-lived so this makes more sense. Eventually, this will simply wrap around the BungeeCord scheduler, since most of its pressing issues are resolved.
This commit is contained in:
Tux 2015-06-22 04:02:19 -04:00
parent 4834b7826f
commit 2cbe1997a0

View File

@ -463,7 +463,7 @@ public final class RedisBungee extends Plugin {
FutureTask<Void> task2 = new FutureTask<>(new Callable<Void>() { FutureTask<Void> task2 = new FutureTask<>(new Callable<Void>() {
@Override @Override
public Void call() throws Exception { public Void call() throws Exception {
service = Executors.newFixedThreadPool(16); service = Executors.newCachedThreadPool();
httpClient = new OkHttpClient(); httpClient = new OkHttpClient();
Dispatcher dispatcher = new Dispatcher(service); Dispatcher dispatcher = new Dispatcher(service);
httpClient.setDispatcher(dispatcher); httpClient.setDispatcher(dispatcher);