OptionalidleOptionalmaxThe maximum number of Threads that are allowed to be running at once. Once this limit is reached, any further calls will be enqueued in a promise until a Thread becomes available.
By default, the maximum is set to os.availableParallelism() - 1, which generally should not be exceeded, as it should not offer any performance gains.
Setting this value to less than minThreads will cause minThreads to be lowered to the same value.
OptionalminThe number of Threads to keep active with a Thread.idleTimeout of Infinity (never close automatically).
By default, one Thread will be kept warm for fast startup times.
Additional Threads in the range of minThreads + 1 and maxThreads (inclusive) will have their Thread.idleTimeout set to idleTimeout.
Setting this value to greater than maxThreads will cause maxThreads to be raised to the same value.
How long (in milliseconds) to keep the Thread or ThreadPool active after completing a task before terminating it. Keeping the
ThreadorThreadPoolopen will decrease repeat startup times, but will cause the program to hang and not exit if the Thread.close method is not called. Default is0(close immediately).