File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010#define CGRAPH_GPARAM_H
1111
1212#include < set>
13+ #include < mutex>
1314
1415#include " GParamObject.h"
1516
@@ -20,7 +21,7 @@ class GParam : public GParamObject {
2021#if __cplusplus >= 201703L
2122 std::shared_mutex _param_shared_lock_; // 用于参数互斥的锁信息
2223#else
23- std::mutex _param_shared_lock_;
24+ std::recursive_mutex _param_shared_lock_;
2425#endif
2526
2627 /* *
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ using CGRAPH_UNIQUE_LOCK = std::unique_lock<std::mutex>;
3939 using CGRAPH_READ_LOCK = std::shared_lock<std::shared_mutex>;
4040 using CGRAPH_WRITE_LOCK = std::unique_lock<std::shared_mutex>;
4141#else
42- using CGRAPH_READ_LOCK = CGRAPH_LOCK_GUARD ; // C++11和14不支持读写锁,使用mutex替代
43- using CGRAPH_WRITE_LOCK = CGRAPH_LOCK_GUARD ;
42+ using CGRAPH_READ_LOCK = std::lock_guard<std::recursive_mutex> ; // C++11和14不支持读写锁,使用mutex替代
43+ using CGRAPH_WRITE_LOCK = std::lock_guard<std::recursive_mutex> ;
4444#endif
4545
4646template <typename T>
Original file line number Diff line number Diff line change 3344@File: T27-Trim.cpp
55@Time: 2024/9/28 21:43
6- @Desc: 本例主要演示,通过 Trim () 方法,修剪pipeline中的冗余依赖逻辑
6+ @Desc: 本例主要演示,通过 trim () 方法,修剪pipeline中的冗余依赖逻辑
77***************************/
88
99#include " MyGNode/MyNode1.h"
You can’t perform that action at this time.
0 commit comments