[pytango] 377/483: Add guard to allow ORB run without blocking GIL; Fix minor issues with version and pid

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


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

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit 8e9cc59ec11147b0da029e2b976f70a8f346db5b
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Tue May 6 11:40:06 2014 +0000

    Add guard to allow ORB run without blocking GIL; Fix minor issues with version and pid
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@25532 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 src/boost/cpp/server/tango_util.cpp | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/boost/cpp/server/tango_util.cpp b/src/boost/cpp/server/tango_util.cpp
index d6594af..0316814 100644
--- a/src/boost/cpp/server/tango_util.cpp
+++ b/src/boost/cpp/server/tango_util.cpp
@@ -200,8 +200,21 @@ namespace PyUtil
     
     void orb_run(Tango::Util& self)
     {
+        AutoPythonAllowThreads guard;
         self.get_orb()->run();
     }
+
+    boost::python::str get_pid_str(Tango::Util& self)
+    {
+        boost::python::str ret = self.get_pid_str().c_str();
+        return ret;
+    }
+
+    boost::python::str get_version_str(Tango::Util& self)
+    {
+        boost::python::str ret = self.get_version_str().c_str();
+        return ret;
+    }
 }
 
 void init_python()
@@ -242,12 +255,10 @@ void export_util()
             return_value_policy<copy_non_const_reference>())
         .def("get_host_name", &Tango::Util::get_host_name,
             return_value_policy<copy_non_const_reference>())
-        .def("get_pid_str", &Tango::Util::get_pid_str,
-            return_value_policy<copy_non_const_reference>())
+        .def("get_pid_str", &PyUtil::get_pid_str)
         .def("get_pid", &Tango::Util::get_pid)
         .def("get_tango_lib_release", &Tango::Util::get_tango_lib_release)
-        .def("get_version_str", &Tango::Util::get_version_str,
-            return_value_policy<copy_non_const_reference>())
+        .def("get_version_str", &PyUtil::get_version_str)
         .def("get_server_version", &Tango::Util::get_server_version,
             return_value_policy<copy_non_const_reference>())
         .def("set_server_version", &Tango::Util::set_server_version)

-- 
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