Skip to content

Commit 90b07ef

Browse files
committed
Don't make more checkers than files
1 parent 3642613 commit 90b07ef

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

internal/core/concurrency.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@ func (c Concurrency) SingleThreaded() bool {
5353
}
5454

5555
func (c Concurrency) CheckerCount(numFiles int) int {
56-
if c.checkerCount == -1 {
57-
return max(1, numFiles)
58-
}
59-
return max(1, c.checkerCount)
56+
checkerCount := min(c.checkerCount, numFiles)
57+
checkerCount = max(1, checkerCount)
58+
return checkerCount
6059
}
6160

6261
var testProgramConcurrency = sync.OnceValues(func() (concurrency Concurrency, raw string) {

0 commit comments

Comments
 (0)