Skip to content

Commit

Permalink
Use consistent thread count (#4115)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaxter authored Jun 28, 2021
1 parent 05d13a1 commit 59fceae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class AggregatingSignatureVerificationService extends SignatureVerificationServi
final int numThreads,
final int queueCapacity,
final int maxBatchSize) {
this.asyncRunner = asyncRunnerFactory.create(this.getClass().getSimpleName(), numThreads);
this.numThreads = Math.min(numThreads, Runtime.getRuntime().availableProcessors());
this.asyncRunner = asyncRunnerFactory.create(this.getClass().getSimpleName(), this.numThreads);
this.maxBatchSize = maxBatchSize;

this.batchSignatureTasks = new ArrayBlockingQueue<>(queueCapacity);
Expand Down

0 comments on commit 59fceae

Please sign in to comment.