changeset 6694:1fff016b86e8

comment
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 13 Apr 2026 14:05:54 +0200
parents 6e137b01f124
children 4dfff5043aef
files OrthancFramework/Sources/MultiThreading/BlockingSharedMessageQueue.h OrthancFramework/Sources/Toolbox.cpp OrthancServer/Resources/Configuration.json
diffstat 3 files changed, 18 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/MultiThreading/BlockingSharedMessageQueue.h	Mon Apr 13 12:16:07 2026 +0200
+++ b/OrthancFramework/Sources/MultiThreading/BlockingSharedMessageQueue.h	Mon Apr 13 14:05:54 2026 +0200
@@ -33,8 +33,17 @@
 
 namespace Orthanc
 {
-  // Compared to SharedMessageQueue that is discarding old messages when it is full,
-  // this queue blocks the Enqueue method until there is room for a new message.
+  /**
+   * There are 2 main differences between BlockingSharedMessageQueue
+   * and SharedMessageQueue:
+   *
+   * 1. In the "Enqueue()" method, if "maxSize != 0" and the queue is
+   * full, SharedMessageQueue discards one item, while
+   * BlockingSharedMessageQueue blocks until there is room for a new
+   * item.
+   *
+   * 2. BlockingSharedMessageQueue only works in FIFO mode.
+   **/
   class ORTHANC_PUBLIC BlockingSharedMessageQueue : public boost::noncopyable
   {
   private:
@@ -52,8 +61,10 @@
     
     ~BlockingSharedMessageQueue();
 
-    // This transfers the ownership of the message only if it is actually pushed in the queue (hence the unique_ptr)
-    bool Enqueue(std::unique_ptr<IDynamicObject>& message, int32_t millisecondsTimeout);
+    // This transfers the ownership of the message only if it is
+    // actually pushed in the queue (hence the unique_ptr)
+    bool Enqueue(std::unique_ptr<IDynamicObject>& message,
+                 int32_t millisecondsTimeout);
 
     // This transfers the ownership of the message
     void Enqueue(IDynamicObject* message);
--- a/OrthancFramework/Sources/Toolbox.cpp	Mon Apr 13 12:16:07 2026 +0200
+++ b/OrthancFramework/Sources/Toolbox.cpp	Mon Apr 13 14:05:54 2026 +0200
@@ -220,7 +220,7 @@
 #if ORTHANC_ENABLE_MD5 == 1
 #  if BOOST_VERSION >= 106600
   
-  struct Toolbox::MD5Context::PImpl
+  struct Toolbox::MD5Context::PImpl : public boost::noncopyable
   {
     boost::uuids::detail::md5  md5_;
     bool                       done_;
@@ -341,7 +341,7 @@
   }
 
 
-  struct Toolbox::MD5Context::PImpl
+  struct Toolbox::MD5Context::PImpl : public boost::noncopyable
   {
     md5_state_s  state_;
     bool         done_;
--- a/OrthancServer/Resources/Configuration.json	Mon Apr 13 12:16:07 2026 +0200
+++ b/OrthancServer/Resources/Configuration.json	Mon Apr 13 14:05:54 2026 +0200
@@ -2,7 +2,7 @@
   /**
    * General configuration of Orthanc
    *
-   * As a general recommendation, you should always favor absoluteq
+   * As a general recommendation, you should always favor absolute
    * paths when you need to provide a path to a file or a directory.  
    * This is not done in this configuration file since we don't know 
    * where Orthanc is going to be installed.