mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
优先定时器释放问题
This commit is contained in:
@@ -72,6 +72,9 @@ func (disp *Dispatcher) AfterFuncEx(funName string,d time.Duration, cbex func(ti
|
|||||||
t.name = funName//reflect.TypeOf(cbex).Name()
|
t.name = funName//reflect.TypeOf(cbex).Name()
|
||||||
//t.name = runtime.FuncForPC(reflect.ValueOf(cbex).Pointer()).Name()
|
//t.name = runtime.FuncForPC(reflect.ValueOf(cbex).Pointer()).Name()
|
||||||
t.t = time.AfterFunc(d, func() {
|
t.t = time.AfterFunc(d, func() {
|
||||||
|
if disp == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
disp.ChanTimer <- t
|
disp.ChanTimer <- t
|
||||||
})
|
})
|
||||||
return t
|
return t
|
||||||
|
|||||||
Reference in New Issue
Block a user