Skip to content

Commit

Permalink
set default maxNumSequence
Browse files Browse the repository at this point in the history
  • Loading branch information
lxning committed Nov 1, 2023
1 parent 8e7ce9e commit 0a90a87
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ public Model(ModelArchive modelArchive, int queueSize) {
sequenceMaxIdleMSec = modelArchive.getModelConfig().getSequenceMaxIdleMSec();
maxSequenceJobQueueSize =
modelArchive.getModelConfig().getMaxSequenceJobQueueSize();
maxNumSequence = modelArchive.getModelConfig().getMaxNumSequence();
maxNumSequence =
Math.max(
modelArchive.getModelConfig().getMaxNumSequence(),
batchSize * maxWorkers);
jobGroups = new ConcurrentHashMap<>(maxNumSequence);
pendingJobGroups = new LinkedBlockingDeque<>(maxNumSequence);
jobGroupLock = new ReentrantLock();
Expand Down

0 comments on commit 0a90a87

Please sign in to comment.