# HG changeset patch # User Sebastien Jodogne # Date 1780378835 -7200 # Node ID 26f91b7e621dbd30d55d70109f3c7526bdbdc36f # Parent 55194a6e7d0770297a619358f8c32f6124c0c768 removed throttlingSemaphore_ diff -r 55194a6e7d07 -r 26f91b7e621d OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp --- 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 -/** - * 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 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");