mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 14:49:53 +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.
|
* The maximum number of executor threads.
|
||||||
*/
|
*/
|
||||||
private static final int MAX_EXECUTOR_THREADS =
|
private static final int MAX_EXECUTOR_THREADS =
|
||||||
Runtime.getRuntime().availableProcessors();
|
Math.max(1, Runtime.getRuntime().availableProcessors() - 1);
|
||||||
|
|
||||||
private final ExecutorService cryptoExecutor;
|
private final ExecutorService cryptoExecutor;
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class SyncModule {
|
|||||||
* executor concurrently.
|
* executor concurrently.
|
||||||
*/
|
*/
|
||||||
private static final int MAX_CONCURRENT_VALIDATION_TASKS =
|
private static final int MAX_CONCURRENT_VALIDATION_TASKS =
|
||||||
Runtime.getRuntime().availableProcessors();
|
Math.max(1, Runtime.getRuntime().availableProcessors() - 1);
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
GroupFactory provideGroupFactory(CryptoComponent crypto) {
|
GroupFactory provideGroupFactory(CryptoComponent crypto) {
|
||||||
|
|||||||
Reference in New Issue
Block a user