[pytango] 49/98: Fix push_data_ready_event() deadlock (issue #22, PR #27)

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


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

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

commit 6accf5be7c2cc5a76f120517ac0ede8029da6ab1
Author: Jairo Moldes <jairomoldes at users.noreply.github.com>
Date:   Fri Jul 15 11:59:32 2016 +0200

    Fix push_data_ready_event() deadlock (issue #22, PR #27)
---
 src/boost/cpp/server/device_impl.cpp | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/boost/cpp/server/device_impl.cpp b/src/boost/cpp/server/device_impl.cpp
index 78becea..7dc02f8 100644
--- a/src/boost/cpp/server/device_impl.cpp
+++ b/src/boost/cpp/server/device_impl.cpp
@@ -484,6 +484,16 @@ namespace PyDeviceImpl
         SAFE_PUSH_EVENT_DATE_QUALITY_VARGS(self, name, filt_names, filt_vals, data, t, quality, x, y)
     }
 
+    /* **********************************
+     * data ready event
+     * **********************************/
+    inline void push_data_ready_event(Tango::DeviceImpl &self, const str &name,
+                                      long ctr)
+    {
+        SAFE_PUSH(self, attr, name)
+        self.push_data_ready_event(__att_name, ctr); //__att_name from SAFE_PUSH
+    }
+
     void check_attribute_method_defined(PyObject *self,
                                         const std::string &attr_name,
                                         const std::string &method_name)
@@ -1358,9 +1368,6 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(set_change_event_overload,
 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(set_archive_event_overload,
                                        Tango::DeviceImpl::set_archive_event, 2, 3)
 
-BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(push_data_ready_event_overload,
-                                       Tango::DeviceImpl::push_data_ready_event, 1, 2)
-
 BOOST_PYTHON_FUNCTION_OVERLOADS(remove_attribute_overload,
                                 PyDeviceImpl::remove_attribute, 2, 3)
                                        
@@ -1588,8 +1595,10 @@ void export_device_impl()
             (void (*) (Tango::DeviceImpl &, str &, object &, object &, object &, double, Tango::AttrQuality, long, long))
             &PyDeviceImpl::push_event)
 
-        .def("push_data_ready_event", &Tango::DeviceImpl::push_data_ready_event,
-            push_data_ready_event_overload())
+        .def("push_data_ready_event",
+            (void (*) (Tango::DeviceImpl &, str &, long))
+            &PyDeviceImpl::push_data_ready_event,
+            (arg_("self"), arg_("attr_name"), arg_("ctr")))
 
         .def("push_att_conf_event", &Tango::DeviceImpl::push_att_conf_event)
 

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