diff --git a/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp b/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp index 2a33696c..841bbbe0 100644 --- a/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp +++ b/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.cpp @@ -127,6 +127,7 @@ CVoid GDynamicEngine::afterElementRun(GElementPtr element) { process(cur, cur == ready.back()); } + CGRAPH_LOCK_GUARD lock(lock_); /** * 满足一下条件之一,则通知wait函数停止等待 * 1,无后缀节点全部执行完毕 diff --git a/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.h b/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.h index 1323d329..2aac774e 100644 --- a/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.h +++ b/src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine/GDynamicEngine.h @@ -66,7 +66,7 @@ class GDynamicEngine : public GEngine { GElementPtrArr total_element_arr_; // pipeline中所有的元素信息集合 GElementPtrArr front_element_arr_; // 没有依赖的元素信息 CSize total_end_size_ = 0; // 图结束节点数量 - std::atomic finished_end_size_ { 0 }; // 执行结束节点数量 + CSize finished_end_size_ = 0; // 执行结束节点数量 std::atomic run_element_size_ { 0 }; // 执行元素的个数,用于后期校验。这里和静态不一样,需要加atomic CStatus cur_status_; // 当前全局的状态信息