diff OrthancServer/Sources/ServerContext.cpp @ 5183:5ec3dcdf78b9

renamed HousekeeperThread as MemoryTrimmingThread to avoid confusion with Housekeeper plugin
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 25 Mar 2023 12:07:39 +0100
parents cddf28cfcd8d
children dd085f7e7e71
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.cpp	Sat Mar 25 11:38:37 2023 +0100
+++ b/OrthancServer/Sources/ServerContext.cpp	Sat Mar 25 12:07:39 2023 +0100
@@ -109,10 +109,10 @@
 
 
 #if HAVE_MALLOC_TRIM == 1
-  void ServerContext::HousekeeperThread(ServerContext* that,
-                                        unsigned int sleepDelay)
+  void ServerContext::MemoryTrimmingThread(ServerContext* that,
+                                           unsigned int sleepDelay)
   {
-    // note, right now, this thread is started only if malloc_trim is defined
+    // This thread is started only if malloc_trim is defined
     while (!that->done_)
     {
       boost::this_thread::sleep(boost::posix_time::milliseconds(sleepDelay));
@@ -439,9 +439,9 @@
       changeThread_ = boost::thread(ChangeThread, this, (unitTesting ? 20 : 100));
       
 #if HAVE_MALLOC_TRIM == 1
-      housekeeperThread_ = boost::thread(HousekeeperThread, this, 100);
+      memoryTrimmingThread_ = boost::thread(MemoryTrimmingThread, this, 100);
 #else
-      LOG(INFO) << "Your platform does not support malloc_trim(), not starting the housekeeper thread";
+      LOG(INFO) << "Your platform does not support malloc_trim(), not starting the memory trimming thread";
 #endif
       
       dynamic_cast<DcmtkTranscoder&>(*dcmtkTranscoder_).SetLossyQuality(lossyQuality);
@@ -486,9 +486,9 @@
         saveJobsThread_.join();
       }
 
-      if (housekeeperThread_.joinable())
+      if (memoryTrimmingThread_.joinable())
       {
-        housekeeperThread_.join();
+        memoryTrimmingThread_.join();
       }
 
       jobsEngine_.GetRegistry().ResetObserver();