mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-10 18:56:55 +02:00
fix shutdown stuck or panic
This commit is contained in:
@@ -30,9 +30,12 @@ func RootTask(name string, needFinish ...bool) *Task {
|
||||
}
|
||||
|
||||
func newRoot() *Task {
|
||||
t := &Task{name: "root"}
|
||||
t := &Task{
|
||||
name: "root",
|
||||
childrenDone: make(chan struct{}),
|
||||
finished: make(chan struct{}),
|
||||
}
|
||||
t.ctx, t.cancel = context.WithCancelCause(context.Background())
|
||||
t.callbacks = make(map[*Callback]struct{})
|
||||
return t
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user