mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-11-25 12:25:15 +01:00
Tweak ThreadPoolExecutor max pool size again
This commit is contained in:
parent
85d40a061b
commit
5d87915eaa
@ -42,8 +42,8 @@ public class StandardScheduler implements Scheduler {
|
|||||||
new ThreadPoolExecutor(
|
new ThreadPoolExecutor(
|
||||||
/* Core pool size */
|
/* Core pool size */
|
||||||
1,
|
1,
|
||||||
/* Max pool size: cpu cores / 2 or at least 1 */
|
/* Max pool size: cpu cores - 2 or at least 4 */
|
||||||
Math.max(1, Runtime.getRuntime().availableProcessors() / 2),
|
Math.max(4, Runtime.getRuntime().availableProcessors() - 2),
|
||||||
/* Timeout */
|
/* Timeout */
|
||||||
60, TimeUnit.SECONDS,
|
60, TimeUnit.SECONDS,
|
||||||
new SynchronousQueue<>(),
|
new SynchronousQueue<>(),
|
||||||
|
Loading…
Reference in New Issue
Block a user