Skip to content

Commit

Permalink
use GOMAXPROCS instead of NumCPU
Browse files Browse the repository at this point in the history
  • Loading branch information
welkin22 committed Oct 23, 2024
1 parent accb269 commit 6fe50ad
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/parallel_state_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
_ "go.uber.org/automaxprocs"
)

var runner chan func()

func initParallelRunner(targetNum int) {
if targetNum == 0 {
targetNum = runtime.NumCPU()
targetNum = runtime.GOMAXPROCS(0)
}
runner = make(chan func(), targetNum)
for i := 0; i < targetNum; i++ {
Expand Down

0 comments on commit 6fe50ad

Please sign in to comment.