Skip to content

Commit 736ff5d

Browse files
RafaelGSStargos
authored andcommitted
src: use a default thread name for inspector
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]>
1 parent 8dc6376 commit 736ff5d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/inspector_io.cc

+5
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ void InspectorIo::ThreadMain(void* io) {
283283
}
284284

285285
void InspectorIo::ThreadMain() {
286+
int thread_name_error = uv_thread_setname("InspectorIo");
287+
if (!thread_name_error) [[unlikely]] {
288+
per_process::Debug(node::DebugCategory::INSPECTOR_SERVER,
289+
"Failed to set thread name for Inspector\n");
290+
}
286291
uv_loop_t loop;
287292
loop.data = nullptr;
288293
int err = uv_loop_init(&loop);

0 commit comments

Comments
 (0)