Add thread names

This commit is contained in:
Robbert van der Helm
2021-06-06 23:45:47 +02:00
parent fe7f6eff96
commit a7496fae77
11 changed files with 41 additions and 3 deletions
+3
View File
@@ -111,6 +111,7 @@ class PluginBridge {
has_realtime_priority_promise.set_value(
set_realtime_priority(true));
set_realtime_priority(false);
pthread_setname_np(pthread_self(), "wine-stdio");
io_context.run();
}) {}
@@ -302,6 +303,8 @@ class PluginBridge {
host_watchdog_handler = std::jthread([&](std::stop_token st) {
using namespace std::literals::chrono_literals;
pthread_setname_np(pthread_self(), "watchdog");
while (!st.stop_requested()) {
if (!plugin_host->running()) {
generic_logger.log(
+1
View File
@@ -73,6 +73,7 @@ Vst2PluginBridge::Vst2PluginBridge(audioMasterCallback host_callback)
// lockstep anyway
host_callback_handler = std::jthread([&]() {
set_realtime_priority(true);
pthread_setname_np(pthread_self(), "host-callbacks");
sockets.vst_host_callback.receive_events(
std::pair<Vst2Logger&, bool>(logger, false),
+1
View File
@@ -49,6 +49,7 @@ Vst3PluginBridge::Vst3PluginBridge()
// configuration.
host_callback_handler = std::jthread([&]() {
set_realtime_priority(true);
pthread_setname_np(pthread_self(), "host-callbacks");
sockets.vst_host_callback.receive_messages(
std::pair<Vst3Logger&, bool>(logger, false),