MCPcopy Create free account
hub / github.com/catboost/catboost / Cancel

Method Cancel

library/cpp/par/par_exec.h:93–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 return MasterGuid;
92 }
93 void Cancel() {
94 if (AtomicCas(&CurrentState, -1, 0)) {
95 if (CompleteNotify.Get()) {
96 CompleteNotify->MRCommandComplete(true, nullptr);
97 CompleteNotify = nullptr;
98 } else
99 Y_ASSERT(0 && "Notify ptr is lost");
100 }
101 }
102 bool NeedResult() {
103 if (AtomicGet(CurrentState) != 0)
104 return false;

Callers 2

MRCommandCompleteMethod · 0.45

Calls 3

AtomicCasFunction · 0.50
GetMethod · 0.45
MRCommandCompleteMethod · 0.45

Tested by

no test coverage detected