1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-26 12:51:29 +00:00

change position GOMAXPROCS to init that user can set own GOMAXPROCS

This commit is contained in:
astaxie 2013-08-12 12:46:59 +08:00
parent 328f4566e4
commit eb06435f23

View File

@ -79,6 +79,7 @@ func init() {
XSRFKEY = "beegoxsrf" XSRFKEY = "beegoxsrf"
XSRFExpire = 60 XSRFExpire = 60
ParseConfig() ParseConfig()
runtime.GOMAXPROCS(runtime.NumCPU())
} }
type App struct { type App struct {
@ -298,7 +299,6 @@ func Run() {
Warn(err) Warn(err)
} }
} }
runtime.GOMAXPROCS(runtime.NumCPU())
registerErrorHander() registerErrorHander()
BeeApp.Run() BeeApp.Run()
} }