MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / takeResult

Method takeResult

common/script/scriptrunner.cpp:137–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137std::optional<ScriptRunner::Outcome> ScriptRunner::takeResult(void)
138{
139 if (mState.load() != State::Done) {
140 return std::nullopt;
141 }
142
143 Outcome outcome;
144 {
145 std::lock_guard<std::mutex> lock(mMutex);
146 outcome = mOutcome;
147 }
148 mState.store(State::Idle);
149 return outcome;
150}

Callers

nothing calls this directly

Calls 2

storeMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected