summaryrefslogtreecommitdiffhomepage
path: root/pose-widget/pose-widget.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-04-06 04:22:12 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-04-06 04:22:12 +0200
commitf9160866df2a045146910ab555af718cde676694 (patch)
treee401a2aca39f28cbd4a484071b2529bac41dc47e /pose-widget/pose-widget.hpp
parente1f1ab62f1aaa5ee9924f1d124dc4a1b66ea9893 (diff)
pose-widget: avoid condition variable overhead
It's busy-looping on Windows.
Diffstat (limited to 'pose-widget/pose-widget.hpp')
-rw-r--r--pose-widget/pose-widget.hpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/pose-widget/pose-widget.hpp b/pose-widget/pose-widget.hpp
index 7befe72d..3e98624c 100644
--- a/pose-widget/pose-widget.hpp
+++ b/pose-widget/pose-widget.hpp
@@ -15,7 +15,6 @@
#include "compat/euler.hpp"
#include <mutex>
-#include <condition_variable>
#include <atomic>
#ifdef BUILD_POSE_WIDGET
@@ -67,7 +66,6 @@ class pose_transform final : private QThread
rmat rotation, rotation_;
vec3 translation, translation_;
- std::condition_variable cvar;
std::mutex mtx, mtx2;
QWidget* dst;
@@ -77,7 +75,7 @@ class pose_transform final : private QThread
int width, height;
- std::atomic_flag fresh;
+ std::atomic<bool> fresh;
static constexpr int w = 320, h = 240;
};