- tasksch中,任务完成后要将worker置空,否则被管理的任务的worker会hold住大量对象

This commit is contained in:
gazebo
2019-08-29 11:19:54 +08:00
parent 4ad77227d6
commit 6c805edf92
3 changed files with 4 additions and 1 deletions

View File

@@ -24,6 +24,6 @@ func (m *SyncMapWithTimeout) Delete(key interface{}) {
if value, ok := m.timers.Load(key); ok {
timer := value.(*time.Timer)
timer.Stop()
m.timers.Delete(key)
}
m.timers.Delete(key)
}