Skip to content

Commit b1a772d

Browse files
committed
Merge pull request #20803 from alalek:core_parallel_workaround_tsan
2 parents f11f2bf + 62414e3 commit b1a772d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/core/src/parallel_impl.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,11 @@ void ThreadPool::run(const Range& range, const ParallelLoopBody& body, double ns
615615
{
616616
WorkerThread& thread = *(threads[i].get());
617617
if (
618+
#if defined(__clang__) && defined(__has_feature)
619+
#if __has_feature(thread_sanitizer)
620+
1 || // Robust workaround to avoid data race warning of `thread.job`
621+
#endif
622+
#endif
618623
#if !defined(CV_USE_GLOBAL_WORKERS_COND_VAR)
619624
thread.isActive ||
620625
#endif

0 commit comments

Comments
 (0)