mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 18:20:27 +00:00
✨ 增加初始化等待
This commit is contained in:
14
order/init.go
Normal file
14
order/init.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package order
|
||||
|
||||
import "sync"
|
||||
|
||||
var wg sync.WaitGroup
|
||||
|
||||
// DoneOnExit 在退出时执行 Done
|
||||
func DoneOnExit() func() {
|
||||
wg.Add(1)
|
||||
return wg.Done
|
||||
}
|
||||
|
||||
// Wait 等待
|
||||
var Wait = wg.Wait
|
||||
Reference in New Issue
Block a user