qixiaoning
2025-09-19 724c05408de0cd74cc852e15cd2c8a0fce0be0c9
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()
    }()
}