refactor: rename miniaudio thread (#5538)

This commit is contained in:
pajlada
2024-08-10 15:01:06 +02:00
committed by GitHub
parent 74d65a345d
commit 2b45b2e0a9
3 changed files with 4 additions and 1 deletions
@@ -6,6 +6,7 @@
#include "singletons/Paths.hpp"
#include "singletons/Settings.hpp"
#include "singletons/WindowManager.hpp"
#include "util/RenameThread.hpp"
#include "widgets/Window.hpp"
#include <boost/asio/executor_work_guard.hpp>
@@ -193,6 +194,7 @@ MiniaudioBackend::MiniaudioBackend()
this->audioThread = std::make_unique<std::thread>([this] {
this->ioContext.run();
});
renameThread(*this->audioThread, "C2Miniaudio");
}
MiniaudioBackend::~MiniaudioBackend()
+1 -1
View File
@@ -10,7 +10,7 @@
namespace chatterino {
template <typename T>
void renameThread(T &&thread, const QString &threadName)
void renameThread(T &thread, const QString &threadName)
{
#ifdef Q_OS_LINUX
pthread_setname_np(thread.native_handle(), threadName.toLocal8Bit());