| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 772f8f4 commit 0718a70
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -101,6 +101,7 @@ class WorkerThreadsTaskRunner::DelayedTaskScheduler { | |||
| 101 | 101 | ||
| 102 | 102 | std::unique_ptr<uv_thread_t> Start() { | |
| 103 | 103 | auto start_thread = [](void* data) { | |
| 104 | + uv_thread_setname("DelayedTaskSchedulerWorker"); | ||
| 104 | 105 | static_cast<DelayedTaskScheduler*>(data)->Run(); | |
| 105 | 106 | }; | |
| 106 | 107 | std::unique_ptr<uv_thread_t> t { new uv_thread_t() }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -80,6 +80,7 @@ Watchdog::~Watchdog() { | |||
| 80 | 80 | ||
| 81 | 81 | ||
| 82 | 82 | void Watchdog::Run(void* arg) { | |
| 83 | + uv_thread_setname("Watchdog"); | ||
| 83 | 84 | Watchdog* wd = static_cast<Watchdog*>(arg); | |
| 84 | 85 | ||
| 85 | 86 | // UV_RUN_DEFAULT the loop will be stopped either by the async or the | |
@@ -229,9 +230,9 @@ void TraceSigintWatchdog::HandleInterrupt() { | |||
| 229 | 230 | ||
| 230 | 231 | #ifdef __POSIX__ | |
| 231 | 232 | void* SigintWatchdogHelper::RunSigintWatchdog(void* arg) { | |
| 233 | + uv_thread_setname("SigintWatchdog"); | ||
| 232 | 234 | // Inside the helper thread. | |
| 233 | 235 | bool is_stopping; | |
| 234 | - | ||
| 235 | 236 | do { | |
| 236 | 237 | uv_sem_wait(&instance.sem_); | |
| 237 | 238 | is_stopping = InformWatchdogsAboutSignal(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,10 +94,15 @@ void Agent::Start() { | |||
| 94 | 94 | // This thread should be created *after* async handles are created | |
| 95 | 95 | // (within NodeTraceWriter and NodeTraceBuffer constructors). | |
| 96 | 96 | // Otherwise the thread could shut down prematurely. | |
| 97 | - CHECK_EQ(0, uv_thread_create(&thread_, [](void* arg) { | ||
| 98 | - Agent* agent = static_cast<Agent*>(arg); | ||
| 99 | - uv_run(&agent->tracing_loop_, UV_RUN_DEFAULT); | ||
| 100 | - }, this)); | ||
| 97 | + CHECK_EQ(0, | ||
| 98 | + uv_thread_create( | ||
| 99 | + &thread_, | ||
| 100 | + [](void* arg) { | ||
| 101 | + uv_thread_setname("TraceEventWorker"); | ||
| 102 | + Agent* agent = static_cast<Agent*>(arg); | ||
| 103 | + uv_run(&agent->tracing_loop_, UV_RUN_DEFAULT); | ||
| 104 | + }, | ||
| 105 | + this)); | ||
| 101 | 106 | started_ = true; | |
| 102 | 107 | } | |
| 103 | 108 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments