Allow environment var GOMAXPROCS=<N> to override NumCPU().
This commit is contained in:
parent
5f7b1f1b4f
commit
70852905e0
1 changed files with 1 additions and 1 deletions
|
@ -449,7 +449,7 @@ func (ct *ClaimTrie) makeNameHashNext(names [][]byte, all bool, interrupt <-chan
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}
|
}
|
||||||
|
|
||||||
threads := int(0.8 * float32(runtime.NumCPU()))
|
threads := int(0.8 * float32(runtime.GOMAXPROCS(0)))
|
||||||
if threads < 1 {
|
if threads < 1 {
|
||||||
threads = 1
|
threads = 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue