, . :
int N_CPUS = Runtime.getRuntime(). availableProcessors();
Using this value, you can determine how many threads should exist in the thread pool if you plan to implement it. To learn more about thread pool size, you can in Java in Concurrency, section 8.2.
source
share