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

Method run

example/E03-ThirdFlow.cpp:83–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81class ResultGNode : public GNode {
82public:
83 CStatus run() override {
84 while (true) {
85 std::shared_ptr<ResultMParam> result = nullptr;
86 auto status = CGRAPH_RECV_MPARAM_WITH_TIMEOUT(ResultMParam, RESULT_TOPIC_NAME, result, 1000);
87 if (status.isErr()) {
88 break;
89 }
90
91 randomSleep(1, 5);
92 CGRAPH_ECHO("negative num is [%d], english info is [%s], process time is [%d]ms",
93 result->negative_num_, result->eng_info_.c_str(), result->process_ts_);
94 }
95
96 CGRAPH_ECHO(" ----> ResultGNode run finished");
97 return CStatus();
98 }
99};
100
101void example_third_flow() {

Callers

nothing calls this directly

Calls 3

randomSleepFunction · 0.85
CGRAPH_ECHOFunction · 0.85
isErrMethod · 0.80

Tested by

no test coverage detected