Browse Source

Use runtime.GOMAXPROCS to calc default concurrency

DarthSim 2 năm trước cách đây
mục cha
commit
bf472d3df9
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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