Set default microtask threshold in init for easier override

This commit is contained in:
Daniel 2022-11-04 16:11:38 +01:00
parent d21c8e6cda
commit 70b58138b9
2 changed files with 2 additions and 3 deletions

View file

@ -30,7 +30,8 @@ const (
func init() {
var microTasksVal int32
microTasks = &microTasksVal
var microTasksThreshholdVal int32
microTasksThreshholdVal := int32(runtime.GOMAXPROCS(0) * 2)
microTasksThreshhold = &microTasksThreshholdVal
}

View file

@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"os"
"runtime"
"github.com/tevino/abool"
@ -36,7 +35,6 @@ func Start() error {
defer mgmtLock.Unlock()
// start microtask scheduler
SetMaxConcurrentMicroTasks(runtime.GOMAXPROCS(0))
go microTaskScheduler()
// inter-link modules