File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
sycl/source/detail/scheduler Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -209,11 +209,10 @@ class DispatchHostTask {
209
209
// process. Thus we'll copy deps prior to completing of event and unblocking
210
210
// of empty command.
211
211
// Also, it's possible to have record deallocated prior to enqueue process.
212
+ // Thus we employ read-lock of graph.
212
213
{
213
214
Scheduler &Sched = Scheduler::getInstance ();
214
- std::unique_lock<std::shared_timed_mutex> Lock (Sched.MGraphLock ,
215
- std::defer_lock);
216
- Sched.lockSharedTimedMutex (Lock);
215
+ std::shared_lock<std::shared_timed_mutex> Lock (Sched.MGraphLock );
217
216
218
217
std::vector<DepDesc> Deps = MThisCmd->MDeps ;
219
218
Original file line number Diff line number Diff line change @@ -133,8 +133,7 @@ std::vector<EventImplPtr> Scheduler::getWaitList(EventImplPtr Event) {
133
133
}
134
134
135
135
void Scheduler::waitForEvent (EventImplPtr Event) {
136
- std::unique_lock<std::shared_timed_mutex> Lock (MGraphLock, std::defer_lock);
137
- lockSharedTimedMutex (Lock);
136
+ std::shared_lock<std::shared_timed_mutex> Lock (MGraphLock);
138
137
GraphProcessor::waitForEvent (std::move (Event));
139
138
}
140
139
You can’t perform that action at this time.
0 commit comments