beego default set GOMAXPROCS to NumCPU
Showing
1 changed file
with
2 additions
and
0 deletions
| ... | @@ -9,6 +9,7 @@ import ( | ... | @@ -9,6 +9,7 @@ import ( |
| 9 | "net/http/fcgi" | 9 | "net/http/fcgi" |
| 10 | "os" | 10 | "os" |
| 11 | "path" | 11 | "path" |
| 12 | "runtime" | ||
| 12 | "strconv" | 13 | "strconv" |
| 13 | ) | 14 | ) |
| 14 | 15 | ||
| ... | @@ -249,5 +250,6 @@ func Run() { | ... | @@ -249,5 +250,6 @@ func Run() { |
| 249 | Warn(err) | 250 | Warn(err) |
| 250 | } | 251 | } |
| 251 | } | 252 | } |
| 253 | runtime.GOMAXPROCS(runtime.NumCPU()) | ||
| 252 | BeeApp.Run() | 254 | BeeApp.Run() |
| 253 | } | 255 | } | ... | ... |
-
Please register or sign in to post a comment