Skip to content
Snippets Groups Projects
Unverified Commit fb85ecf0 authored by akwizgran's avatar akwizgran
Browse files

Added note about number of available processors changing.

parent 3aa46443
No related branches found
No related tags found
1 merge request!507Use a polite executor for validation tasks
......@@ -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);
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment