mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Limit size of Authenticator Cache Thread Pool (#8360)
This commit is contained in:
parent
d92d75fb7b
commit
44c7404b51
1 changed files with 1 additions and 11 deletions
|
@ -12,18 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
}
|
||||
|
||||
+ // Paper start - Cache authenticator threads
|
||||
+ private static final AtomicInteger threadId = new AtomicInteger(0);
|
||||
+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(
|
||||
+ r -> {
|
||||
+ Thread ret = new Thread(r, "User Authenticator #" + threadId.incrementAndGet());
|
||||
+ private static final java.util.concurrent.ExecutorService authenticatorPool = new java.util.concurrent.ThreadPoolExecutor(0, 16, 60L, java.util.concurrent.TimeUnit.SECONDS, new java.util.concurrent.SynchronousQueue<>(), new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
|
||||
+
|
||||
+ ret.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER));
|
||||
+
|
||||
+ return ret;
|
||||
+ }
|
||||
+ );
|
||||
+ // Paper end
|
||||
// Spigot start
|
||||
public void initUUID()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue