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

Method run

tutorial/MyGNode/MyEventNode.h:16–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14class MyEventNode : public CGraph::GNode {
15public:
16 CStatus run () override {
17 CStatus status;
18 CGraph::CGRAPH_ECHO("[%s], before event notify", this->getName().c_str());
19 /**
20 * 模拟在这里,触发一个 trigger信息,同名的事件被异步执行
21 * 从打印结果可以看出,after event send 这条信息,提前执行
22 * 执行的时候,和pipeline公用同一个线程池资源
23 */
24 notify("my-print-event", GEventType::SYNC);
25
26 CGraph::CGRAPH_ECHO("[%s], after event notify", this->getName().c_str());
27 return status;
28 }
29};
30
31#endif //CGRAPH_MYEVENTNODE_H

Callers

nothing calls this directly

Calls 2

CGRAPH_ECHOFunction · 0.85
notifyFunction · 0.85

Tested by

no test coverage detected