mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
If we have multiple cores, leave one free from crypto tasks.
This commit is contained in:
@@ -39,7 +39,7 @@ public class CryptoModule {
|
||||
* The maximum number of executor threads.
|
||||
*/
|
||||
private static final int MAX_EXECUTOR_THREADS =
|
||||
Runtime.getRuntime().availableProcessors();
|
||||
Math.max(1, Runtime.getRuntime().availableProcessors() - 1);
|
||||
|
||||
private final ExecutorService cryptoExecutor;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class SyncModule {
|
||||
* executor concurrently.
|
||||
*/
|
||||
private static final int MAX_CONCURRENT_VALIDATION_TASKS =
|
||||
Runtime.getRuntime().availableProcessors();
|
||||
Math.max(1, Runtime.getRuntime().availableProcessors() - 1);
|
||||
|
||||
@Provides
|
||||
GroupFactory provideGroupFactory(CryptoComponent crypto) {
|
||||
|
||||
Reference in New Issue
Block a user