This commit is contained in:
jiazhizhong
2022-03-10 17:09:03 +08:00
commit 1279635d7f
97 changed files with 10632 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package util
import (
"sync"
)
type WaitGroupWrapper struct {
sync.WaitGroup
}
func (w *WaitGroupWrapper) Wrap(cb func()) {
w.Add(1)
go func() {
cb()
w.Done()
}()
}