From 2cbe1997a00a8df49805edec942478f48ece89f1 Mon Sep 17 00:00:00 2001 From: Tux Date: Mon, 22 Jun 2015 04:02:19 -0400 Subject: [PATCH] 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. --- .../com/imaginarycode/minecraft/redisbungee/RedisBungee.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java index cbc27e5..8052d0a 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisBungee.java @@ -463,7 +463,7 @@ public final class RedisBungee extends Plugin { FutureTask task2 = new FutureTask<>(new Callable() { @Override public Void call() throws Exception { - service = Executors.newFixedThreadPool(16); + service = Executors.newCachedThreadPool(); httpClient = new OkHttpClient(); Dispatcher dispatcher = new Dispatcher(service); httpClient.setDispatcher(dispatcher);