mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
Allow to set GOMAXPROCS (#965)
Allow to set GOMAXPROCS https://stackoverflow.com/questions/17853831/what-is-the-gomaxprocs-default-value https://pkg.go.dev/runtime#GOMAXPROCS
This commit is contained in:
parent
6369cc8f3e
commit
4bcd4f9d3a
3 changed files with 3 additions and 9 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue