mirror of https://github.com/opencv/opencv.git
Merge pull request #24581 from vrabaud:tsan
Fix race condition in color_lab.cpp initLabTabs(). #24581 There is a race condition between when the static bool is initialized (which is thread safe) and its value check. This PR changes the static bool to a static lambda call to make it thread safe. The static_cast<void> in the end is to prevent unused variables warnings. ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related workpull/24599/head
parent
49463c4420
commit
06f62a3dd1
1 changed files with 91 additions and 90 deletions
Loading…
Reference in new issue