Lines Matching refs:syncId
43 void Wait(SyncIdType syncId, const std::function<void()>& asyncOps) in Wait() argument
46 name_.c_str(), static_cast<int>(syncId)); in Wait()
49 waitSet_.insert(syncId); in Wait()
51 cv_.Wait(lock, [this, syncId] { return syncMap_.find(syncId) != syncMap_.end(); }); in Wait()
52 syncMap_.erase(syncId); in Wait()
56 bool WaitFor(SyncIdType syncId, const std::function<void()>& asyncOps, int timeoutMs) in WaitFor() argument
59 name_.c_str(), static_cast<int>(syncId), timeoutMs); in WaitFor()
64 waitSet_.insert(syncId); in WaitFor()
66 …auto rtv = cv_.WaitFor(lock, timeoutMs, [this, syncId] { return syncMap_.find(syncId) != syncMap_.… in WaitFor()
68 syncMap_.erase(syncId); in WaitFor()
70 waitSet_.erase(syncId); in WaitFor()
75 void Wait(SyncIdType syncId, const std::function<void()>& asyncOps, ResultType& result) in Wait() argument
78 name_.c_str(), static_cast<int>(syncId)); in Wait()
81 waitSet_.insert(syncId); in Wait()
83 cv_.Wait(lock, [this, syncId] { return syncMap_.find(syncId) != syncMap_.end(); }); in Wait()
84 result = syncMap_[syncId]; in Wait()
85 syncMap_.erase(syncId); in Wait()
89 …bool WaitFor(SyncIdType syncId, const std::function<bool()>& asyncOps, int timeoutMs, ResultType& … in WaitFor() argument
92 name_.c_str(), static_cast<int>(syncId), timeoutMs); in WaitFor()
97 waitSet_.insert(syncId); in WaitFor()
99 waitSet_.erase(syncId); in WaitFor()
102 …auto rtv = cv_.WaitFor(lock, timeoutMs, [this, syncId] { return syncMap_.find(syncId) != syncMap_.… in WaitFor()
104 result = syncMap_[syncId]; in WaitFor()
105 syncMap_.erase(syncId); in WaitFor()
107 static_cast<int>(syncId)); in WaitFor()
109 waitSet_.erase(syncId); in WaitFor()
114 void Notify(SyncIdType syncId, ResultType result = ResultType())
117 name_.c_str(), static_cast<int>(syncId));
119 if (waitSet_.find(syncId) != waitSet_.end()) {
120 waitSet_.erase(syncId);
121 syncMap_.insert({syncId, result});