mirror of
https://github.com/beego/bee.git
synced 2024-11-21 23:50:54 +00:00
fix linux cpu 100%
This commit is contained in:
parent
a2c9ff7213
commit
89acd00955
6
run.go
6
run.go
@ -67,6 +67,7 @@ var conf struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func runApp(cmd *Command, args []string) {
|
func runApp(cmd *Command, args []string) {
|
||||||
|
exit := make(chan bool)
|
||||||
if len(args) != 1 {
|
if len(args) != 1 {
|
||||||
fmt.Println("[ERRO] Argument [appname] is missing")
|
fmt.Println("[ERRO] Argument [appname] is missing")
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
@ -92,7 +93,10 @@ func runApp(cmd *Command, args []string) {
|
|||||||
appname = args[0]
|
appname = args[0]
|
||||||
Autobuild()
|
Autobuild()
|
||||||
for {
|
for {
|
||||||
runtime.Gosched()
|
select {
|
||||||
|
case <-exit:
|
||||||
|
runtime.Goexit()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user