fix: 修复循环依赖问题
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user