Added note about number of available processors changing.

This commit is contained in:
akwizgran
2017-04-06 15:34:39 +01:00
parent 3aa4644339
commit fb85ecf07b
2 changed files with 6 additions and 0 deletions

View File

@@ -37,6 +37,9 @@ public class CryptoModule {
/**
* The maximum number of executor threads.
* <p>
* The number of available processors can change during the lifetime of the
* JVM, so this is just a reasonable guess.
*/
private static final int MAX_EXECUTOR_THREADS =
Math.max(1, Runtime.getRuntime().availableProcessors() - 1);

View File

@@ -34,6 +34,9 @@ public class SyncModule {
/**
* The maximum number of validation tasks to delegate to the crypto
* executor concurrently.
* <p>
* The number of available processors can change during the lifetime of the
* JVM, so this is just a reasonable guess.
*/
private static final int MAX_CONCURRENT_VALIDATION_TASKS =
Math.max(1, Runtime.getRuntime().availableProcessors() - 1);