diff --git a/bramble-core/src/main/java/org/briarproject/bramble/crypto/CryptoModule.java b/bramble-core/src/main/java/org/briarproject/bramble/crypto/CryptoModule.java index 8f0299441ced948ad754374d1ed5c0d0280f0fd2..5ab4becce5b58fba195864c63654b2d5d2043b8d 100644 --- a/bramble-core/src/main/java/org/briarproject/bramble/crypto/CryptoModule.java +++ b/bramble-core/src/main/java/org/briarproject/bramble/crypto/CryptoModule.java @@ -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); diff --git a/bramble-core/src/main/java/org/briarproject/bramble/sync/SyncModule.java b/bramble-core/src/main/java/org/briarproject/bramble/sync/SyncModule.java index eea0e2d3bb2299ae57b3f12c8df659e5dbdad3a0..ca6ec897af315954beb53279a1a7c8df794808a3 100644 --- a/bramble-core/src/main/java/org/briarproject/bramble/sync/SyncModule.java +++ b/bramble-core/src/main/java/org/briarproject/bramble/sync/SyncModule.java @@ -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);