mirror of
https://github.com/safing/portbase
synced 2025-04-12 13:39:09 +00:00
Set default microtask threshold in init for easier override
This commit is contained in:
parent
d21c8e6cda
commit
70b58138b9
2 changed files with 2 additions and 3 deletions
modules
|
@ -30,7 +30,8 @@ const (
|
|||
func init() {
|
||||
var microTasksVal int32
|
||||
microTasks = µTasksVal
|
||||
var microTasksThreshholdVal int32
|
||||
|
||||
microTasksThreshholdVal := int32(runtime.GOMAXPROCS(0) * 2)
|
||||
microTasksThreshhold = µTasksThreshholdVal
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue