[pytango] 04/21: Release GIL in DeviceProxy constructor

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:16:33 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag v9.2.0a
in repository pytango.

commit 40884313fad81181e03258d3c378423ad3a9f15e
Author: Jose Tiago Coutinho Macara <tiago.coutinho at esrf.fr>
Date:   Tue Dec 1 09:12:19 2015 +0100

    Release GIL in DeviceProxy constructor
---
 src/boost/cpp/device_proxy.cpp | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/boost/cpp/device_proxy.cpp b/src/boost/cpp/device_proxy.cpp
index aa2adf1..1a72b33 100644
--- a/src/boost/cpp/device_proxy.cpp
+++ b/src/boost/cpp/device_proxy.cpp
@@ -402,12 +402,22 @@ namespace PyDeviceProxy
 
     static boost::shared_ptr<Tango::DeviceProxy> makeDeviceProxy1(const std::string& name)
     {
-        return boost::shared_ptr<Tango::DeviceProxy>(new Tango::DeviceProxy(name.c_str()));
+	Tango::DeviceProxy* dp = NULL;
+	{
+	    AutoPythonAllowThreads guard;
+	    dp = new Tango::DeviceProxy(name.c_str());
+	}
+        return boost::shared_ptr<Tango::DeviceProxy>(dp);
     }
 
     static boost::shared_ptr<Tango::DeviceProxy> makeDeviceProxy2(const std::string& name, bool b)
     {
-      return boost::shared_ptr<Tango::DeviceProxy>(new Tango::DeviceProxy(name.c_str(), b));
+	Tango::DeviceProxy* dp = NULL;
+	{
+	    AutoPythonAllowThreads guard;
+	    dp = new Tango::DeviceProxy(name.c_str(), b);
+	}
+	return boost::shared_ptr<Tango::DeviceProxy>(dp);
     }
 };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list