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
+5 -1
View File
@@ -775,7 +775,11 @@ class AdHocSocketHandler {
std::move(secondary_socket));
});
Thread secondary_requests_handler([&]() { secondary_context.run(); });
Thread secondary_requests_handler([&]() {
pthread_setname_np(pthread_self(), "adhoc-acceptor");
secondary_context.run();
});
// Now we'll handle reads on the primary socket in a loop until the
// socket shuts down