refactor: rename miniaudio thread (#5538)
This commit is contained in:
@@ -61,6 +61,7 @@
|
|||||||
- Dev: Refactored 7TV/BTTV definitions out of `TwitchIrcServer` into `Application`. (#5532)
|
- Dev: Refactored 7TV/BTTV definitions out of `TwitchIrcServer` into `Application`. (#5532)
|
||||||
- Dev: Refactored code that's responsible for deleting old update files. (#5535)
|
- Dev: Refactored code that's responsible for deleting old update files. (#5535)
|
||||||
- Dev: Cleanly exit on shutdown. (#5537)
|
- Dev: Cleanly exit on shutdown. (#5537)
|
||||||
|
- Dev: Renamed miniaudio backend thread name. (#5538)
|
||||||
- Dev: Refactored a few `#define`s into `const(expr)` and cleaned includes. (#5527)
|
- Dev: Refactored a few `#define`s into `const(expr)` and cleaned includes. (#5527)
|
||||||
- Dev: Prepared for Qt 6.8 by addressing some deprecations. (#5529)
|
- Dev: Prepared for Qt 6.8 by addressing some deprecations. (#5529)
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "singletons/Paths.hpp"
|
#include "singletons/Paths.hpp"
|
||||||
#include "singletons/Settings.hpp"
|
#include "singletons/Settings.hpp"
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
|
#include "util/RenameThread.hpp"
|
||||||
#include "widgets/Window.hpp"
|
#include "widgets/Window.hpp"
|
||||||
|
|
||||||
#include <boost/asio/executor_work_guard.hpp>
|
#include <boost/asio/executor_work_guard.hpp>
|
||||||
@@ -193,6 +194,7 @@ MiniaudioBackend::MiniaudioBackend()
|
|||||||
this->audioThread = std::make_unique<std::thread>([this] {
|
this->audioThread = std::make_unique<std::thread>([this] {
|
||||||
this->ioContext.run();
|
this->ioContext.run();
|
||||||
});
|
});
|
||||||
|
renameThread(*this->audioThread, "C2Miniaudio");
|
||||||
}
|
}
|
||||||
|
|
||||||
MiniaudioBackend::~MiniaudioBackend()
|
MiniaudioBackend::~MiniaudioBackend()
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void renameThread(T &&thread, const QString &threadName)
|
void renameThread(T &thread, const QString &threadName)
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
pthread_setname_np(thread.native_handle(), threadName.toLocal8Bit());
|
pthread_setname_np(thread.native_handle(), threadName.toLocal8Bit());
|
||||||
|
|||||||
Reference in New Issue
Block a user