Skip to content

Commit

Permalink
src: set signal inspector io thread name
Browse files Browse the repository at this point in the history
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 Yeaseen committed Feb 6, 2025
1 parent 124597b commit 8507b55
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,9 @@ changes:
* Maximum sizes:
* Windows: 32,767 characters
* macOS: 64 characters
* Other systems: 16 characters
* Linux: 16 characters
* NetBSD: limited to `PTHREAD_MAX_NAMELEN_NP`
* FreeBSD and OpenBSD: limited to `MAXCOMLEN`
**Default:** `'WorkerThread'`.

### Event: `'error'`
Expand Down
1 change: 1 addition & 0 deletions src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ static void StartIoThreadWakeup(int signo, siginfo_t* info, void* ucontext) {
}

inline void* StartIoThreadMain(void* unused) {
uv_thread_setname("SignalInspector");
for (;;) {
uv_sem_wait(&start_io_thread_semaphore);
Mutex::ScopedLock lock(start_io_thread_async_mutex);
Expand Down
2 changes: 1 addition & 1 deletion src/inspector_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ 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");
"Failed to set thread name for Inspector\n");
}
uv_loop_t loop;
loop.data = nullptr;
Expand Down

0 comments on commit 8507b55

Please sign in to comment.