Fix Disk Usage thread
This commit is contained in:
@@ -2883,6 +2883,13 @@ void thread_base::exec()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void thread_ctrl::set_name(std::string name)
|
||||||
|
{
|
||||||
|
ensure(g_tls_this_thread);
|
||||||
|
g_tls_this_thread->m_tname.store(make_single<std::string>(name));
|
||||||
|
g_tls_this_thread->set_name(std::move(name));
|
||||||
|
}
|
||||||
|
|
||||||
[[noreturn]] void thread_ctrl::emergency_exit(std::string_view reason)
|
[[noreturn]] void thread_ctrl::emergency_exit(std::string_view reason)
|
||||||
{
|
{
|
||||||
// Print stacktrace
|
// Print stacktrace
|
||||||
|
|||||||
+2
-6
@@ -129,7 +129,7 @@ public:
|
|||||||
const native_entry entry_point;
|
const native_entry entry_point;
|
||||||
|
|
||||||
// Set name for debugger
|
// Set name for debugger
|
||||||
static void set_name(std::string);
|
static void set_name(std::string name);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Thread handle (platform-specific)
|
// Thread handle (platform-specific)
|
||||||
@@ -232,11 +232,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set current thread name (not recommended)
|
// Set current thread name (not recommended)
|
||||||
static void set_name(std::string name)
|
static void set_name(std::string name);
|
||||||
{
|
|
||||||
g_tls_this_thread->m_tname.store(make_single<std::string>(name));
|
|
||||||
g_tls_this_thread->set_name(std::move(name));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set thread name (not recommended)
|
// Set thread name (not recommended)
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ void game_list_actions::ShowDiskUsageDialog()
|
|||||||
// so run it on a concurrent thread avoiding to block the entire GUI
|
// so run it on a concurrent thread avoiding to block the entire GUI
|
||||||
m_disk_usage_future = QtConcurrent::run([this]()
|
m_disk_usage_future = QtConcurrent::run([this]()
|
||||||
{
|
{
|
||||||
thread_ctrl::set_name("Disk Usage");
|
thread_base::set_name("Disk Usage");
|
||||||
|
|
||||||
const std::vector<std::pair<std::string, u64>> vfs_disk_usage = rpcs3::utils::get_vfs_disk_usage();
|
const std::vector<std::pair<std::string, u64>> vfs_disk_usage = rpcs3::utils::get_vfs_disk_usage();
|
||||||
const u64 cache_disk_usage = rpcs3::utils::get_cache_disk_usage();
|
const u64 cache_disk_usage = rpcs3::utils::get_cache_disk_usage();
|
||||||
|
|||||||
Reference in New Issue
Block a user