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:
parent
9748d7274f
commit
330951cb62
@ -34,6 +34,10 @@
|
||||
#include "tree_widget_item.h"
|
||||
#include "globals.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user