MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / Notify

Method Notify

oneflow/core/common/notifier.cpp:22–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20namespace oneflow {
21
22NotifierStatus Notifier::Notify() {
23 bool notify = false;
24 {
25 std::unique_lock<std::mutex> lock(mutex_);
26 if (is_closed_) { return kNotifierStatusErrorClosed; }
27 notify = (notified_cnt_ == 0);
28 ++notified_cnt_;
29 }
30 if (notify) { cond_.notify_one(); }
31 return kNotifierStatusSuccess;
32}
33
34NotifierStatus Notifier::WaitAndClearNotifiedCnt() {
35 std::unique_lock<std::mutex> lock(mutex_);

Callers 7

SyncAccessSmallMemFunction · 0.80
ComputeMethod · 0.80
BlockingRunProbeFuncMethod · 0.80
ReceiveMethod · 0.80
NotifyOrRunSchedulerMethod · 0.80
OnWorkerLoadPendingMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected