summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-10-12 19:02:41 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-10-12 17:08:59 +0000
commit4ae9126f2c7d34631ee7e77f64fa161dab76e8d2 (patch)
treede2305d9d8c5ffd01e655f554215c1910f3d9d18 /logic
parentc57b524d3038dd1d94379038d362dea5b2896c60 (diff)
logic/pipeline: attempt adjust thread priority
Calling QThread::setPriority twice in a succession means: 1. if you can, set high priority a) if not allowed, highest won't work either b) if allowed, see below 2. if you can, set highest priority a) if highest is allowed, happy happy joy joy b) if not, at least high priority is successful Note that we don't have any return value from QThread::setPriority().
Diffstat (limited to 'logic')
-rw-r--r--logic/pipeline.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp
index e506b7cf..6a01b272 100644
--- a/logic/pipeline.cpp
+++ b/logic/pipeline.cpp
@@ -277,6 +277,7 @@ bool maybe_nan(const char* text, const char* fun, int line, const xs&... vals)
# define nan_check(...) (void)(__VA_ARGS__)
#endif
+
bool pipeline::maybe_enable_center_on_tracking_started()
{
if (!tracking_started)
@@ -546,6 +547,9 @@ void pipeline::run()
const MMRESULT mmres = timeBeginPeriod(1);
#endif
+ setPriority(QThread::HighPriority);
+ setPriority(QThread::HighestPriority);
+
{
static const char* const posechannels[6] = { "TX", "TY", "TZ", "Yaw", "Pitch", "Roll" };
static const char* const datachannels[5] = { "dt", "raw", "corrected", "filtered", "mapped" };