From 330951cb62c95725987cfe6332a2a5fdaf9629a0 Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Wed, 14 Sep 2016 23:14:47 +0300 Subject: [PATCH] (profiler_gui) Low priority for deleter thread --- profiler_gui/tree_widget_loader.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/profiler_gui/tree_widget_loader.cpp b/profiler_gui/tree_widget_loader.cpp index b93ee68..08af697 100644 --- a/profiler_gui/tree_widget_loader.cpp +++ b/profiler_gui/tree_widget_loader.cpp @@ -34,6 +34,10 @@ #include "tree_widget_item.h" #include "globals.h" +#ifdef _WIN32 +#include +#endif + #ifdef max #undef max #endif @@ -111,6 +115,11 @@ void EasyTreeWidgetLoader::interrupt() for (auto item : _items) delete item.second; }, ::std::move(m_topLevelItems)); + +#ifdef _WIN32 + SetThreadPriority(deleter_thread.native_handle(), THREAD_PRIORITY_LOWEST); +#endif + deleter_thread.detach(); m_items.clear();