将sync.WaitGroup包装一层,代码优雅一些
package main
import (
"fmt"
"sync"
)
type WaitGroupWrapper struct {
sync.WaitGroup
}
func (w *WaitGroupWrapper) Wrap(cb func()
将sync.WaitGroup包装一层,代码优雅一些
package main
import (
"fmt"
"sync"
)
type WaitGroupWrapper struct {
sync.WaitGroup
}
func (w *WaitGroupWrapper) Wrap(cb func()