Skip to content
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

Switch from deprecated tbb::mutex to std::mutex #6

Open
wants to merge 1 commit into
base: release
Choose a base branch
from

Conversation

mmdanggg2
Copy link
Contributor

ReleaseNote

Compatibility (major, minor, patch, build): build
Jira ticket: na
Release Notes Comment:

Special Notes: Changes away from tbb::mutex to the std::mutex as it has been deprecated and removed in tbb 2021+

Look or Scene Setup Change: No

@kjeffery
Copy link

Thank you for the changes! We have been slowly replacing tbb mutexes with std mutexes, but we have not concentrated on doing so.

Below is a note to the MoonRay developer who integrates this change. I'm not necessarily asking you to modify your patch.

std::scoped_lock should be replaced with std::lock_guard.

  • std::scoped_lock does not exist until C++17, and we are targeting C++14.
  • std::scoped_lock is for deterministicly locking of multiple mutexes. While this code is valid (it works for zero or more mutexes), we would be better off spelling what we mean with a std::lock_guard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants