MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / stopAllTasks

Method stopAllTasks

worker/draft.go:223–235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221}
222
223func (n *node) stopAllTasks() {
224 defer n.closer.Done() // CLOSER:1
225 <-n.closer.HasBeenClosed()
226
227 glog.Infof("Stopping all ongoing registered tasks...")
228 n.opsLock.Lock()
229 defer n.opsLock.Unlock()
230 for op, closer := range n.ops {
231 glog.Infof("Stopping op: %s...\n", op)
232 closer.SignalAndWait()
233 }
234 glog.Infof("Stopped all ongoing registered tasks.")
235}
236
237// GetOngoingTasks returns the list of ongoing tasks.
238func GetOngoingTasks() []string {

Callers 1

InitAndStartNodeMethod · 0.95

Calls 4

InfofMethod · 0.80
DoneMethod · 0.45
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected