Start working loop first

This commit is contained in:
mikespook 2013-01-11 11:33:13 +08:00
parent ab0fc4a6a5
commit aa9b5e9598

View File

@ -190,13 +190,13 @@ func (worker *Worker) Work() {
v.Close()
}
}()
for funcname, f := range worker.funcs {
worker.addFunc(funcname, f.timeout)
}
worker.running = true
for _, v := range worker.agents {
go v.Work()
}
for funcname, f := range worker.funcs {
worker.addFunc(funcname, f.timeout)
}
ok := true
for ok {
var job *Job