script: shorten script thread name (#41033)

On Linux thread names are limited to 15 characters: that caused all the
script threads to be named 'ScriptScriptEve' and show up with the same
name in tooling.

That changes turns the name to 'Script#{script id}' instead.

Testing: No test coverage for that very internal detail.

Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
webbeef
2025-12-03 11:43:04 -08:00
committed by GitHub
parent 3321438da8
commit 27a776b060
2 changed files with 11 additions and 4 deletions

View File

@@ -433,7 +433,7 @@ impl ScriptThreadFactory for ScriptThread {
let script_thread_id = state.id;
thread::Builder::new()
.name(format!("Script{script_thread_id:?}"))
.name(format!("Script#{script_thread_id}"))
.spawn(move || {
thread_state::initialize(ThreadState::SCRIPT | ThreadState::LAYOUT);
PipelineNamespace::install(state.pipeline_namespace_id);