Skip to content

Commit 18c23f5

Browse files
committed
src: set worker thread name using worker.name
1 parent 3c08050 commit 18c23f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/node_worker.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,7 @@ void Worker::StartThread(const FunctionCallbackInfo<Value>& args) {
739739
Worker* w = static_cast<Worker*>(arg);
740740
const uintptr_t stack_top = reinterpret_cast<uintptr_t>(&arg);
741741

742+
uv_thread_setname(w->name_.c_str());
742743
// Leave a few kilobytes just to make sure we're within limits and have
743744
// some space to do work in C++ land.
744745
w->stack_base_ = stack_top - (w->stack_size_ - kStackBufferSize);

0 commit comments

Comments
 (0)