Ver Fonte

Use runtime.GOMAXPROCS to calc default concurrency

DarthSim há 2 anos atrás
pai
commit
bf472d3df9
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      config/config.go

+ 1 - 1
config/config.go

@@ -203,7 +203,7 @@ func Reset() {
 	KeepAliveTimeout = 10
 	ClientKeepAliveTimeout = 90
 	DownloadTimeout = 5
-	Concurrency = runtime.NumCPU() * 2
+	Concurrency = runtime.GOMAXPROCS(0) * 2
 	RequestsQueueSize = 0
 	MaxClients = 2048