Thomas Anderson 2025-04-16 09:39:15 +03:00 committed by GitHub
commit 4bcd4f9d3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 9 deletions

View file

@ -517,9 +517,7 @@ func main() {
}
cookie := signaling.NewSessionIdCodec([]byte(hashKey), blockBytes)
cpus := runtime.NumCPU()
runtime.GOMAXPROCS(cpus)
log.Printf("Using a maximum of %d CPUs", cpus)
log.Printf("Using a maximum of %d CPUs", runtime.GOMAXPROCS(0))
interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt)

View file

@ -76,9 +76,7 @@ func main() {
log.Fatal("Could not read configuration: ", err)
}
cpus := runtime.NumCPU()
runtime.GOMAXPROCS(cpus)
log.Printf("Using a maximum of %d CPUs", cpus)
log.Printf("Using a maximum of %d CPUs", runtime.GOMAXPROCS(0))
r := mux.NewRouter()

View file

@ -166,9 +166,7 @@ func main() {
log.Fatal("Could not read configuration: ", err)
}
cpus := runtime.NumCPU()
runtime.GOMAXPROCS(cpus)
log.Printf("Using a maximum of %d CPUs", cpus)
log.Printf("Using a maximum of %d CPUs", runtime.GOMAXPROCS(0))
signaling.RegisterStats()