Skip to content

Commit

Permalink
Set default microtask threshold in init for easier override
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaavi committed Nov 4, 2022
1 parent d21c8e6 commit 70b5813
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion modules/microtasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const (
func init() {
var microTasksVal int32
microTasks = &microTasksVal
var microTasksThreshholdVal int32

microTasksThreshholdVal := int32(runtime.GOMAXPROCS(0) * 2)
microTasksThreshhold = &microTasksThreshholdVal
}

Expand Down
2 changes: 0 additions & 2 deletions modules/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"os"
"runtime"

"github.com/tevino/abool"

Expand Down Expand Up @@ -36,7 +35,6 @@ func Start() error {
defer mgmtLock.Unlock()

// start microtask scheduler
SetMaxConcurrentMicroTasks(runtime.GOMAXPROCS(0))
go microTaskScheduler()

// inter-link modules
Expand Down

0 comments on commit 70b5813

Please sign in to comment.