perf(threads): implement adjust_thread_priority for macOS and add set_thread_name (#4605)
This commit is contained in:
@@ -1056,6 +1056,7 @@ namespace nvhttp {
|
||||
}
|
||||
|
||||
void start() {
|
||||
platf::set_thread_name("nvhttp");
|
||||
auto shutdown_event = mail::man->event<bool>(mail::shutdown);
|
||||
|
||||
auto port_http = net::map_port(PORT_HTTP);
|
||||
@@ -1173,6 +1174,8 @@ namespace nvhttp {
|
||||
|
||||
auto accept_and_run = [&](auto *http_server) {
|
||||
try {
|
||||
std::string name = "nvhttp::" + std::to_string(http_server->config.port);
|
||||
platf::set_thread_name(name);
|
||||
http_server->start();
|
||||
} catch (boost::system::system_error &err) {
|
||||
// It's possible the exception gets thrown after calling http_server->stop() from a different thread
|
||||
|
||||
Reference in New Issue
Block a user