[pytango] 376/483: Solve bug: PyTango shutdown sometimes blocks
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:15:01 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 acfb140231b4109307197ad75d56a570a2acb2db
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date: Sun Apr 20 13:35:55 2014 +0000
Solve bug: PyTango shutdown sometimes blocks
git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@25424 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
src/boost/cpp/base_types.cpp | 8 +++++++-
src/boost/python/__init__.py | 6 +++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/boost/cpp/base_types.cpp b/src/boost/cpp/base_types.cpp
index e6ca8e3..dcc9faa 100644
--- a/src/boost/cpp/base_types.cpp
+++ b/src/boost/cpp/base_types.cpp
@@ -223,6 +223,12 @@ int raise_asynch_exception(long thread_id, boost::python::object exp_klass)
return PyThreadState_SetAsyncExc(thread_id, exp_klass.ptr());
}
+void leave()
+{
+ AutoPythonAllowThreads guard;
+ Tango::leavefunc();
+}
+
void export_base_types()
{
enum_<PyTango::ExtractAs>("ExtractAs")
@@ -411,5 +417,5 @@ void export_base_types()
def("_get_tango_lib_release", &Tango::_convert_tango_lib_release);
- def("_leavefunc", &Tango::leavefunc);
+ def("_leavefunc", &leave);
}
diff --git a/src/boost/python/__init__.py b/src/boost/python/__init__.py
index 43ec72d..b1bc15e 100644
--- a/src/boost/python/__init__.py
+++ b/src/boost/python/__init__.py
@@ -192,6 +192,10 @@ from .tango_numpy import NumpyType, numpy_type, numpy_spectrum, numpy_image
from .pytango_init import init as __init
__init()
+
+def __leave():
+ _PyTango._leavefunc()
+
import atexit
-atexit.register(_PyTango._leavefunc)
+atexit.register(__leave)
--
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