From fb85ecf07be22bbf6307593b5fd394c75cd969e2 Mon Sep 17 00:00:00 2001
From: akwizgran <akwizgran@users.sourceforge.net>
Date: Thu, 6 Apr 2017 15:34:39 +0100
Subject: [PATCH] Added note about number of available processors changing.

---
 .../java/org/briarproject/bramble/crypto/CryptoModule.java     | 3 +++
 .../main/java/org/briarproject/bramble/sync/SyncModule.java    | 3 +++
 2 files changed, 6 insertions(+)

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 8f0299441c..5ab4becce5 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 eea0e2d3bb..ca6ec897af 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);
-- 
GitLab