Skip to content

Commit daeafc0

Browse files
committed
src: use node- prefix on thread names
PR-URL: #61307 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent 3cdb1cd commit daeafc0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/node.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
12341234
}
12351235

12361236
if (!(flags & ProcessInitializationFlags::kNoInitializeNodeV8Platform)) {
1237-
uv_thread_setname("MainThread");
1237+
uv_thread_setname("node-MainThread");
12381238
per_process::v8_platform.Initialize(
12391239
static_cast<int>(per_process::cli_options->v8_thread_pool_size));
12401240
result->platform_ = per_process::v8_platform.Platform();

src/node_platform.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static void PrintSourceLocation(const v8::SourceLocation& location) {
4949
}
5050

5151
static void PlatformWorkerThread(void* data) {
52-
uv_thread_setname("V8Worker");
52+
uv_thread_setname("node-V8Worker");
5353
std::unique_ptr<PlatformWorkerData>
5454
worker_data(static_cast<PlatformWorkerData*>(data));
5555

test/addons/uv-thread-name/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const bindingPath = require.resolve(`./build/${common.buildType}/binding`);
1212
const binding = require(bindingPath);
1313

1414
if (isMainThread) {
15-
assert.strictEqual(binding.getThreadName(), 'MainThread');
15+
assert.strictEqual(binding.getThreadName(), 'node-MainThread');
1616

1717
const worker = new Worker(__filename);
1818
worker.on('message', common.mustCall((data) => {

0 commit comments

Comments
 (0)