changeset 6900:26f91b7e621d streaming

removed throttlingSemaphore_
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Jun 2026 07:40:35 +0200
parents 55194a6e7d07
children ce2494cb70ad
files OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp
diffstat 1 files changed, 0 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp	Mon Jun 01 22:14:15 2026 +0200
+++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp	Tue Jun 02 07:40:35 2026 +0200
@@ -39,7 +39,6 @@
 #include "../../../OrthancFramework/Sources/Images/ImageProcessing.h"
 #include "../../../OrthancFramework/Sources/Images/NumpyWriter.h"
 #include "../../../OrthancFramework/Sources/Logging.h"
-#include "../../../OrthancFramework/Sources/MultiThreading/Semaphore.h"
 #include "../../../OrthancFramework/Sources/SerializationToolbox.h"
 
 #include "../OrthancConfiguration.h"
@@ -53,14 +52,6 @@
 #include <boost/shared_ptr.hpp>
 
 
-/**
- * This semaphore is used to limit the number of concurrent HTTP
- * requests on CPU-intensive routes of the REST API, in order to
- * prevent exhaustion of resources (new in Orthanc 1.7.0).
- **/
-static Orthanc::Semaphore throttlingSemaphore_(4);  // TODO => PARAMETER?
-
-
 static const char* const IGNORE_LENGTH = "ignore-length";
 static const char* const RECONSTRUCT_FILES = "ReconstructFiles";
 static const char* const LIMIT_TO_THIS_LEVEL_MAIN_DICOM_TAGS = "LimitToThisLevelMainDicomTags";
@@ -1248,8 +1239,6 @@
   template <enum ImageExtractionMode mode>
   static void GetImage(RestApiGetCall& call)
   {
-    Semaphore::Locker locker(throttlingSemaphore_);
-        
     GetImageHandler handler(mode);
     IDecodedFrameHandler::Apply(call, handler, mode, false /* not rendered */);
   }
@@ -1257,8 +1246,6 @@
 
   static void GetRenderedFrame(RestApiGetCall& call)
   {
-    Semaphore::Locker locker(throttlingSemaphore_);
-        
     RenderedFrameHandler handler;
     IDecodedFrameHandler::Apply(call, handler, ImageExtractionMode_Preview /* arbitrary value */, true);
   }
@@ -1534,8 +1521,6 @@
       return;
     }
 
-    Semaphore::Locker locker(throttlingSemaphore_);
-        
     ServerContext& context = OrthancRestApi::GetContext(call);
 
     std::string frameId = call.GetUriComponent("frame", "0");