Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/node_platform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class WorkerThreadsTaskRunner::DelayedTaskScheduler {

std::unique_ptr<uv_thread_t> Start() {
auto start_thread = [](void* data) {
uv_thread_setname("DelayedTaskSchedulerWorker");
static_cast<DelayedTaskScheduler*>(data)->Run();
};
std::unique_ptr<uv_thread_t> t { new uv_thread_t() };
Expand Down
3 changes: 2 additions & 1 deletion src/node_watchdog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Watchdog::~Watchdog() {


void Watchdog::Run(void* arg) {
uv_thread_setname("Watchdog");
Watchdog* wd = static_cast<Watchdog*>(arg);

// UV_RUN_DEFAULT the loop will be stopped either by the async or the
Expand Down Expand Up @@ -229,9 +230,9 @@ void TraceSigintWatchdog::HandleInterrupt() {

#ifdef __POSIX__
void* SigintWatchdogHelper::RunSigintWatchdog(void* arg) {
uv_thread_setname("SigintWatchdog");
// Inside the helper thread.
bool is_stopping;

do {
uv_sem_wait(&instance.sem_);
is_stopping = InformWatchdogsAboutSignal();
Expand Down
13 changes: 9 additions & 4 deletions src/tracing/agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,15 @@ void Agent::Start() {
// This thread should be created *after* async handles are created
// (within NodeTraceWriter and NodeTraceBuffer constructors).
// Otherwise the thread could shut down prematurely.
CHECK_EQ(0, uv_thread_create(&thread_, [](void* arg) {
Agent* agent = static_cast<Agent*>(arg);
uv_run(&agent->tracing_loop_, UV_RUN_DEFAULT);
}, this));
CHECK_EQ(0,
uv_thread_create(
&thread_,
[](void* arg) {
uv_thread_setname("TraceEventWorker");
Agent* agent = static_cast<Agent*>(arg);
uv_run(&agent->tracing_loop_, UV_RUN_DEFAULT);
},
this));
started_ = true;
}

Expand Down
Loading