bisakhmondal commented on a change in pull request #1569:
URL: https://github.com/apache/apisix-dashboard/pull/1569#discussion_r590556229
##########
File path: api/internal/conf/conf.go
##########
@@ -249,3 +254,16 @@ func initEtcdConfig(conf Etcd) {
Prefix: prefix,
}
}
+
+// initialize parallelism settings
+func initParallelism(choiceCores int) {
+ if choiceCores < 0 {
+ return
+ }
+ maxSupportedCores := runtime.NumCPU()
+
+ runtime.GOMAXPROCS(maxSupportedCores)
+ if choiceCores < maxSupportedCores {
+ runtime.GOMAXPROCS(choiceCores)
+ }
Review comment:
yeah, sure. Thanks for the review.
Edit 1: One thing, I missed putting that the changes for making the default
value of `GOMAXPROCS` from 1 to `NumCPU` have been made on go version 1.5
([thread](https://groups.google.com/g/golang-dev/c/POSw7qrelso/m/dI3YPTeGbkMJ)).
Though in 1.13, manual resetting is not required, still I was trying to be
extra sure. haha.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]