MCPcopy Create free account
hub / github.com/BWbwchen/MapReduce / waitForEnoughWorker

Method waitForEnoughWorker

master/master.go:80–87  ·  view source on GitHub ↗

Normal Functions

()

Source from the content-addressed store, hash-verified

78// Normal Functions
79
80func (ms *Master) waitForEnoughWorker() {
81 log.Trace("[Master] Wait for enough workers")
82 nWorker, totalWorker := ms.getWorkerNum()
83 for nWorker < totalWorker {
84 nWorker, totalWorker = ms.getWorkerNum()
85 }
86 log.Trace("[Master] Enough workers!")
87}
88
89func (ms *Master) getWorkerNum() (int, int) {
90 ms.mux.Lock()

Callers 1

StartMasterFunction · 0.80

Calls 1

getWorkerNumMethod · 0.95

Tested by

no test coverage detected