Fix for a potential data race condition

code changes to handle the failed build
pull/4055/head
rajithr 10 years ago
parent 993e0b0bf9
commit 7658c2e2d5
  1. 4
      modules/objdetect/src/detection_based_tracker.cpp

@ -289,9 +289,9 @@ void* cv::workcycleObjectDetectorFunction(void* p)
((cv::DetectionBasedTracker::SeparateDetectionWork*)p)->isObjectDetectingReady=false;
((cv::DetectionBasedTracker::SeparateDetectionWork*)p)->shouldObjectDetectingResultsBeForgot=false;
#ifdef USE_STD_THREADS
objectDetectorThreadStartStop.notify_one();
((cv::DetectionBasedTracker::SeparateDetectionWork*)p)->objectDetectorThreadStartStop.notify_one();
#else
pthread_cond_signal(&objectDetectorThreadStartStop);
pthread_cond_signal(&(((cv::DetectionBasedTracker::SeparateDetectionWork*)p)->objectDetectorThreadStartStop));
#endif
((cv::DetectionBasedTracker::SeparateDetectionWork*)p)->unlock();
} catch(...) {

Loading…
Cancel
Save