Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/GraphCtrl/GraphElement/GElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
CGRAPH_NAMESPACE_BEGIN

GElement::~GElement() {
CGRAPH_DELETE_PTR(run_task_)
CGRAPH_DELETE_PTR(perf_info_)
CGRAPH_DELETE_PTR(aspect_manager_)
for (auto& param : local_params_) {
Expand Down
2 changes: 1 addition & 1 deletion src/GraphCtrl/GraphElement/GElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ class GElement : public GElementObject,
GAspectManagerPtr aspect_manager_ { nullptr }; // 整体流程的切面管理类
UThreadPoolPtr thread_pool_ { nullptr }; // 用于执行的线程池信息
GPerfInfo* perf_info_ { nullptr }; // 用于perf的信息
UTask* run_task_ { nullptr }; // 用于记录 调度执行函数
UTask run_task_ {}; // 用于记录 调度执行函数
CBool is_prepared_ { false }; // 判断是否已经执行过 prepareRun() 方法

/** 图相关信息 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ CVoid GDynamicEngine::analysisParallelMatrix() {

CVoid GDynamicEngine::makeCommonTask() {
for (auto* element : total_element_arr_) {
CGRAPH_DELETE_PTR(element->run_task_)
element->run_task_ = new UTask([this, element] {
element->run_task_ = UTask([this, element] {
this->innerExec(element);
});
}
Expand All @@ -143,7 +142,7 @@ CVoid GDynamicEngine::process(GElementPtr element, const CBool affinity) {
// 如果 affinity=true,表示用当前的线程,执行这个逻辑。以便增加亲和性
innerExec(element);
} else {
thread_pool_->execute(element->run_task_, element->binding_index_);
thread_pool_->execute(&element->run_task_, element->binding_index_);
}
}

Expand Down
Loading