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

If we have multiple cores, leave one free from crypto tasks.

parent d381e25e
No related branches found
No related tags found
1 merge request!507Use a polite executor for validation tasks
......@@ -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) {
......
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