0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-28 01:04:41 +08:00

(profiler_gui) Low priority for deleter thread

This commit is contained in:
Victor Zarubkin 2016-09-14 23:14:47 +03:00
parent 9748d7274f
commit 330951cb62

View File

@ -34,6 +34,10 @@
#include "tree_widget_item.h" #include "tree_widget_item.h"
#include "globals.h" #include "globals.h"
#ifdef _WIN32
#include <Windows.h>
#endif
#ifdef max #ifdef max
#undef max #undef max
#endif #endif
@ -111,6 +115,11 @@ void EasyTreeWidgetLoader::interrupt()
for (auto item : _items) for (auto item : _items)
delete item.second; delete item.second;
}, ::std::move(m_topLevelItems)); }, ::std::move(m_topLevelItems));
#ifdef _WIN32
SetThreadPriority(deleter_thread.native_handle(), THREAD_PRIORITY_LOWEST);
#endif
deleter_thread.detach(); deleter_thread.detach();
m_items.clear(); m_items.clear();