Skip to content

Commit

Permalink
src: use a default thread name for inspector
Browse files Browse the repository at this point in the history
This commit sets a default thread name whenever
the inspector thread is created (InspectorIo)

PR-URL: #56416
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
  • Loading branch information
RafaelGSS authored and targos committed Feb 7, 2025
1 parent 8dc6376 commit 736ff5d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/inspector_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,11 @@ void InspectorIo::ThreadMain(void* io) {
}

void InspectorIo::ThreadMain() {
int thread_name_error = uv_thread_setname("InspectorIo");
if (!thread_name_error) [[unlikely]] {
per_process::Debug(node::DebugCategory::INSPECTOR_SERVER,
"Failed to set thread name for Inspector\n");
}
uv_loop_t loop;
loop.data = nullptr;
int err = uv_loop_init(&loop);
Expand Down

0 comments on commit 736ff5d

Please sign in to comment.