mirror of
https://github.com/astaxie/beego.git
synced 2025-06-19 11:50:41 +00:00
change position GOMAXPROCS to init that user can set own GOMAXPROCS
This commit is contained in:
2
beego.go
2
beego.go
@ -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()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user