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 <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
  • Loading branch information
RafaelGSS authored and targos committed Feb 7, 2025
1 parent f4b086d commit 915d7ae
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 @@ -1235,7 +1235,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 915d7ae

Please sign in to comment.