changeset 217:f764ba66e409

added option "AllowThreads"
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 03 Jul 2024 17:00:18 +0200
parents dff82fbd0a15
children 240fac923e8d
files NEWS Sources/Plugin.cpp
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Wed Jul 03 15:48:12 2024 +0200
+++ b/NEWS	Wed Jul 03 17:00:18 2024 +0200
@@ -2,7 +2,7 @@
 ===============================
 
 * Created Python documentation for the Orthanc interface, check out "orthanc.pyi"
-* Added possibility to release the GIL during the call to the native SDK functions
+* Added option "AllowThreads" to release the GIL during the call to the native SDK functions
 * Code model is now generated by the "orthanc-java" project
 * Added Windows builder for Python 3.12
 
--- a/Sources/Plugin.cpp	Wed Jul 03 15:48:12 2024 +0200
+++ b/Sources/Plugin.cpp	Wed Jul 03 17:00:18 2024 +0200
@@ -424,6 +424,8 @@
          * Initialization of Python
          **/
 
+        PythonThreadsAllower::SetAllowThreads(pythonConfig.GetBooleanValue("AllowThreads", false));
+
         const bool isVerbose = (globalConfig.GetBooleanValue("PythonVerbose", false) ||
                                 pythonConfig.GetBooleanValue("Verbose", false));