Skip to content
Merged
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
3 changes: 1 addition & 2 deletions sycl/source/detail/scheduler/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,7 @@ void Scheduler::lockSharedTimedMutex(
// access occurs after shared access.
// TODO: after switching to C++17, change std::shared_timed_mutex to
// std::shared_mutex and use std::lock_guard here both for Windows and Linux.
while (!Lock.owns_lock()) {
Lock.try_lock_for(std::chrono::milliseconds(10));
while (!Lock.try_lock_for(std::chrono::milliseconds(10))) {
// Without yield while loop acts like endless while loop and occupies the
// whole CPU when multiple command groups are created in multiple host
// threads
Expand Down