MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / reset

Method reset

src/GraphCtrl/GraphElement/GElementRepository.cpp:44–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43
44CStatus GElementRepository::reset() {
45 CGRAPH_FUNCTION_BEGIN
46 for (auto& cur : async_elements_) {
47 if (GElementTimeoutStrategy::HOLD_BY_PIPELINE == cur->timeout_strategy_) {
48 // 强烈建议,在这里等待执行完成
49 status += cur->getAsyncResult();
50 }
51
52 // 无论如何,写回非 timeout状态,确保不会迭代到下一轮
53 if (cur->isTimeout()) {
54 cur->cur_state_.store(GElementState::NORMAL, std::memory_order_release);
55 }
56 }
57
58 CGRAPH_FUNCTION_END
59}
60
61
62CStatus GElementRepository::pushAllState(const GElementState& state) {

Callers 1

prepareRunMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected