1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Merge pull request #12357 from DEEPIR:master

* fix some static analyzer warnings

* fix some static analyzer warnings

* fix race condition of workthread control
This commit is contained in:
cyy
2018-09-02 21:34:43 +08:00
committed by Alexander Alekhin
parent dce4e94f02
commit 09837928d9
16 changed files with 44 additions and 43 deletions
+3 -3
View File
@@ -186,9 +186,9 @@ public:
pthread_t posix_thread;
bool is_created;
volatile bool stop_thread;
std::atomic<bool> stop_thread;
volatile bool has_wake_signal;
std::atomic<bool> has_wake_signal;
Ptr<ParallelJob> job;
@@ -394,7 +394,7 @@ void WorkerThread::thread_body()
if (CV_WORKER_ACTIVE_WAIT_THREADS_LIMIT == 0)
allow_active_wait = true;
Ptr<ParallelJob> j_ptr; swap(j_ptr, job);
has_wake_signal = false; // TODO .store(false, std::memory_order_release)
has_wake_signal = false;
pthread_mutex_unlock(&mutex);
if (!stop_thread)