Bind the master process to 1 CPU thread. See #799 for more details.

pull/800/head
Cosmin Goea 2020-09-16 14:02:58 -04:00
parent afc9051843
commit abb701ac87
1 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,8 @@ func (app *App) prefork(addr string, tlsConfig *tls.Config) (err error) {
err error
}
// create variables
var max = runtime.GOMAXPROCS(0)
// set 'max' to the previous value of GOMAXPROCS and set GOMAXPROCS to 1 for the master process;
var max = runtime.GOMAXPROCS(1)
var childs = make(map[int]*exec.Cmd)
var channel = make(chan child, max)