qixiaoning
2025-08-08 ef51da5404827e826e979ad614950a9e0192f4c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package util
 
import "sync"
 
type WaitGroupWrapper struct {
    sync.WaitGroup
}
 
func (w *WaitGroupWrapper) Wrap(b func()) {
    w.Add(1)
    go func() {
        b()
        w.Done()
    }()
}