diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-01-13 09:38:44 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-01-13 09:38:44 +0100 |
commit | 464cb73809b73f533d4ddc401425484b890b170c (patch) | |
tree | a2d701959dd1af5b4b6c2130cfffba87dcfe62de | |
parent | 17bca6cacbd56f4692927a4571b8e49361b52bca (diff) |
pt: protect against pthread starvation when stopping
-rw-r--r-- | FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp | 4 | ||||
-rw-r--r-- | FTNoIR_Tracker_PT/ftnoir_tracker_pt.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp b/FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp index 39825168..d15e13f8 100644 --- a/FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp +++ b/FTNoIR_Tracker_PT/ftnoir_tracker_pt.cpp @@ -45,13 +45,13 @@ Tracker::~Tracker() void Tracker::set_command(Command command)
{
- QMutexLocker lock(&mutex);
+ //QMutexLocker lock(&mutex);
commands |= command;
}
void Tracker::reset_command(Command command)
{
- QMutexLocker lock(&mutex);
+ //QMutexLocker lock(&mutex);
commands &= ~command;
}
diff --git a/FTNoIR_Tracker_PT/ftnoir_tracker_pt.h b/FTNoIR_Tracker_PT/ftnoir_tracker_pt.h index 067a4072..1f6efce1 100644 --- a/FTNoIR_Tracker_PT/ftnoir_tracker_pt.h +++ b/FTNoIR_Tracker_PT/ftnoir_tracker_pt.h @@ -65,7 +65,7 @@ protected: };
void set_command(Command command);
void reset_command(Command command);
- int commands;
+ volatile int commands;
CVCamera camera;
FrameRotation frame_rotation;
|