Skip to content

[SYCL] Fix usage of std::conditional_variable in sycl::event #6284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

aelovikov-intel
Copy link
Contributor

@aelovikov-intel aelovikov-intel commented Jun 9, 2022

PR #6245 introduced a misuse of it. I've misunderstood

The notifying thread does not need to hold the lock on the same mutex as the
one held by the waiting thread(s)

from https://en.cppreference.com/w/cpp/thread/condition_variable/notify_all

Instead, https://en.cppreference.com/w/cpp/thread/condition_variable

The thread that intends to modify the shared variable has to...

should be followed.

PR intel#6245 introduced a misuse of it. I've misunderstood

   The notifying thread does not need to hold the lock on the same mutex as the
   one held by the waiting thread(s)

from https://en.cppreference.com/w/cpp/thread/condition_variable/notify_all

Instead, https://en.cppreference.com/w/cpp/thread/condition_variable

   The thread that intends to modify the shared variable has to...

should be followed.
@aelovikov-intel aelovikov-intel requested a review from a team as a code owner June 9, 2022 19:17
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! LGTM.

@aelovikov-intel
Copy link
Contributor Author

@intel/llvm-gatekeepers , PR is ready.

@pvchupin pvchupin merged commit 8ae8bf2 into intel:sycl Jun 9, 2022
@aelovikov-intel aelovikov-intel deleted the fix-hang branch July 28, 2022 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants