fix: 修复循环依赖问题
This commit is contained in:
parent
43920c8ce0
commit
6d8258b153
|
@ -1,7 +1,6 @@
|
|||
package super
|
||||
|
||||
import (
|
||||
"github.com/kercylan98/minotaur/utils/log"
|
||||
"sync"
|
||||
)
|
||||
|
||||
|
@ -12,13 +11,7 @@ type WaitGroup struct {
|
|||
func (w *WaitGroup) Exec(f func()) {
|
||||
w.WaitGroup.Add(1)
|
||||
go func(w *WaitGroup) {
|
||||
defer func() {
|
||||
w.WaitGroup.Done()
|
||||
if err := RecoverTransform(recover()); err != nil {
|
||||
log.Error("WaitGroup", log.Err(err))
|
||||
}
|
||||
}()
|
||||
|
||||
defer w.WaitGroup.Done()
|
||||
f()
|
||||
}(w)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue