From 70852905e05956a27d9709839057c05860a955b5 Mon Sep 17 00:00:00 2001 From: Jonathan Moody <103143855+moodyjon@users.noreply.github.com> Date: Mon, 6 Jun 2022 17:19:26 -0400 Subject: [PATCH] Allow environment var GOMAXPROCS= to override NumCPU(). --- claimtrie/claimtrie.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/claimtrie/claimtrie.go b/claimtrie/claimtrie.go index 68ef6488..d6062c30 100644 --- a/claimtrie/claimtrie.go +++ b/claimtrie/claimtrie.go @@ -449,7 +449,7 @@ func (ct *ClaimTrie) makeNameHashNext(names [][]byte, all bool, interrupt <-chan wg.Done() } - threads := int(0.8 * float32(runtime.NumCPU())) + threads := int(0.8 * float32(runtime.GOMAXPROCS(0))) if threads < 1 { threads = 1 }