MCPcopy Create free account
hub / github.com/bytedance/bolt / notify

Method notify

bolt/exec/Task.cpp:89–102  ·  view source on GitHub ↗

Satisfies the promises passed to 'activate' and invokes the callback. Does nothing if 'activate' hasn't been called or 'notify' has been called already.

Source from the content-addressed store, hash-verified

87 // Does nothing if 'activate' hasn't been called or 'notify' has been
88 // called already.
89 void notify() {
90 if (active_) {
91 for (auto& promise : promises_) {
92 promise.setValue();
93 }
94 promises_.clear();
95
96 if (callback_) {
97 callback_();
98 }
99
100 active_ = false;
101 }
102 }
103
104 private:
105 bool active_{false};

Callers 4

removeDriverMethod · 0.45
noMoreSplitsForGroupMethod · 0.45
terminateMethod · 0.45
notifyReadyToRunMethod · 0.45

Calls 2

setValueMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected