Use 'close(h.Quit)' instead of <- struct{}{}, up to 0.1.4
This commit is contained in:
parent
7f494b3d57
commit
f7d5b41aba
@ -32,7 +32,7 @@ func (w *Waiter) terminateHandler(h *CloseHandler, forceWaitGroupDone bool) {
|
|||||||
if h.handlerFunc != nil && *h.handlerFunc != nil {
|
if h.handlerFunc != nil && *h.handlerFunc != nil {
|
||||||
(*h.handlerFunc)()
|
(*h.handlerFunc)()
|
||||||
}
|
}
|
||||||
h.Quit <- struct{}{}
|
close(h.Quit)
|
||||||
if h.autoDone || forceWaitGroupDone {
|
if h.autoDone || forceWaitGroupDone {
|
||||||
w.waitGroup.Done()
|
w.waitGroup.Done()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user