changeset 313:9b74c8099192

thread names
author Alain Mazy <am@orthanc.team>
date Tue, 27 Jan 2026 16:11:15 +0100
parents e6818f1ef1f3
children eb15d14693a2
files Sources/OnChangeCallback.cpp Sources/Plugin.cpp
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Sources/OnChangeCallback.cpp	Tue Dec 16 19:14:22 2025 +0100
+++ b/Sources/OnChangeCallback.cpp	Tue Jan 27 16:11:15 2026 +0100
@@ -173,6 +173,8 @@
 
 static void ChangesWorker()
 {
+  OrthancPluginSetCurrentThreadName(OrthancPlugins::GetGlobalContext(), "PY-CHANGES");
+
   while (!stopping_)
   {
     for (;;)
--- a/Sources/Plugin.cpp	Tue Dec 16 19:14:22 2025 +0100
+++ b/Sources/Plugin.cpp	Tue Jan 27 16:11:15 2026 +0100
@@ -590,6 +590,8 @@
 
 static void DisplayMemoryUsageThread()
 {
+  OrthancPluginSetCurrentThreadName(OrthancPlugins::GetGlobalContext(), "PY-MEMORY");
+
   {
     PythonLock lock;
     lock.ExecuteCommand("import tracemalloc");