MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Stop

Method Stop

cmd/cql-proxy/task/task.go:95–112  ·  view source on GitHub ↗

Stop terminate running tasks and end the manager scheduling cycle.

()

Source from the content-addressed store, hash-verified

93
94// Stop terminate running tasks and end the manager scheduling cycle.
95func (m *Manager) Stop() {
96 if m.cancel != nil {
97 m.cancel()
98 }
99
100 m.wg.Wait()
101
102 // cleanup
103 m.waitMap = make(map[int64][]*waitItem)
104 for _, t := range m.taskMap {
105 m.cleanupTask(t)
106 }
107 m.taskMap = make(map[int64]*taskItem)
108
109 log.Debug("task manager stopped")
110
111 return
112}
113
114// Kill terminated specified task.
115func (m *Manager) Kill(id int64) {

Callers 3

waitProfileCheckingFunction · 0.45
mainFunction · 0.45
initServerFunction · 0.45

Calls 3

cleanupTaskMethod · 0.95
DebugFunction · 0.92
WaitMethod · 0.80

Tested by 1

waitProfileCheckingFunction · 0.36