mirror of
https://github.com/lzh-1625/go_process_manager.git
synced 2025-10-05 16:06:51 +08:00
update
This commit is contained in:
@@ -21,14 +21,6 @@ var (
|
|||||||
TaskWaitCond = newWaitCond()
|
TaskWaitCond = newWaitCond()
|
||||||
)
|
)
|
||||||
|
|
||||||
var waitCondList []*waitCond
|
|
||||||
|
|
||||||
func InitCondTiming() {
|
|
||||||
for _, v := range waitCondList {
|
|
||||||
go v.timing()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func newWaitCond() *waitCond {
|
func newWaitCond() *waitCond {
|
||||||
wc := &waitCond{
|
wc := &waitCond{
|
||||||
cond: *sync.NewCond(&sync.Mutex{}),
|
cond: *sync.NewCond(&sync.Mutex{}),
|
||||||
@@ -36,7 +28,7 @@ func newWaitCond() *waitCond {
|
|||||||
timeMap: sync.Map{},
|
timeMap: sync.Map{},
|
||||||
trigger: make(chan struct{}),
|
trigger: make(chan struct{}),
|
||||||
}
|
}
|
||||||
waitCondList = append(waitCondList, wc)
|
go wc.timing()
|
||||||
return wc
|
return wc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user