提交 bf29a4d7 编写于 作者: Y Yannis Guyon

Avoid double-checked locking with TSAN in parallel

Omit the first check of the double-checked locking pattern in
recordException() in parallel.cpp when CV_THREAD_SANITIZER is defined.
This should only slow recordException() down when the thread sanitizer
is used, and avoids the TSAN data race warning.
上级 4009bca5
......@@ -263,7 +263,9 @@ namespace {
void recordException(const cv::String& msg)
#endif
{
#ifndef CV_THREAD_SANITIZER
if (!hasException)
#endif
{
cv::AutoLock lock(cv::getInitializationMutex());
if (!hasException)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册