[openrtm-commit:02853] r879 - trunk/OpenRTM-aist-Python/OpenRTM_aist
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 10月 3日 (火) 09:47:12 JST
Author: miyamoto
Date: 2017-10-03 09:47:12 +0900 (Tue, 03 Oct 2017)
New Revision: 879
Modified:
trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextBase.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextProfile.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextWorker.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/ExtTrigExecutionContext.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py
trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
Log:
[compat,->RELENG_1_2] bug fix.
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextBase.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextBase.py 2017-10-02 08:46:51 UTC (rev 878)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextBase.py 2017-10-03 00:47:12 UTC (rev 879)
@@ -421,6 +421,19 @@
self.setProperties(props)
return
+ ##
+ # @if jp
+ # @brief ExecutionContext¤Î½ªÎ»½èÍý
+ #
+ # @else
+ # @brief
+ #
+ # @endif
+ # virtual void exit();
+ def exit(self):
+ self._rtcout.RTC_TRACE("exit()")
+ self._profile.exit()
+ self._worker.exit()
##
# @if jp
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextProfile.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextProfile.py 2017-10-02 08:46:51 UTC (rev 878)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextProfile.py 2017-10-03 00:47:12 UTC (rev 879)
@@ -79,9 +79,9 @@
##
# @if jp
- # @brief ¥Ç¥¹¥È¥é¥¯¥¿
+ # @brief ExecitionContextProfile½ªÎ»½èÍý
#
- # ¥Ç¥¹¥È¥é¥¯¥¿
+ #
#
# @else
# @brief Destructor
@@ -89,8 +89,8 @@
# Destructor
#
# @endif
- def __del__(self):
- self._rtcout.RTC_TRACE("ExecutionContextProfile.__del__()")
+ def exit(self):
+ self._rtcout.RTC_TRACE("exit")
# cleanup EC's profile
self._profile.owner = None
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextWorker.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextWorker.py 2017-10-02 08:46:51 UTC (rev 878)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ExecutionContextWorker.py 2017-10-03 00:47:12 UTC (rev 879)
@@ -81,18 +81,18 @@
##
# @if jp
- # @brief ¥Ç¥¹¥È¥é¥¯¥¿
+ # @brief ExecutionContextWorker½ªÎ»½èÍý
#
- # ¥Ç¥¹¥È¥é¥¯¥¿
+ #
#
# @else
- # @brief Destructor
+ # @brief
#
- # Destructor
+ #
#
# @endif
- def __del__(self):
- self._rtcout.RTC_TRACE("~ExecutionContextWorker.__del__")
+ def exit(self):
+ self._rtcout.RTC_TRACE("exit")
return
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ExtTrigExecutionContext.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ExtTrigExecutionContext.py 2017-10-02 08:46:51 UTC (rev 878)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ExtTrigExecutionContext.py 2017-10-03 00:47:12 UTC (rev 879)
@@ -75,8 +75,8 @@
return
- def __del__(self, Task=OpenRTM_aist.Task):
- self._rtcout.RTC_TRACE("ExtTrigExecutionContext.__del__()")
+ def exit(self, Task=OpenRTM_aist.Task):
+ self._rtcout.RTC_TRACE("exit")
guard = OpenRTM_aist.ScopedLock(self._svcmutex)
self._svc = False
del guard
@@ -89,6 +89,7 @@
del guard
self.wait()
Task.__del__(self)
+ OpenRTM_aist.ExecutionContextBase.exit(self)
return
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py 2017-10-02 08:46:51 UTC (rev 878)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/PeriodicExecutionContext.py 2017-10-03 00:47:12 UTC (rev 879)
@@ -79,7 +79,7 @@
return
- def __del__(self, Task=OpenRTM_aist.Task):
+ def exit(self, Task=OpenRTM_aist.Task):
import OpenRTM_aist.Guard
self._rtcout.RTC_TRACE("PeriodicExecutionContext.__del__()")
guard = OpenRTM_aist.Guard.ScopedLock(self._svcmutex)
@@ -94,6 +94,7 @@
del guard
self.wait()
Task.__del__(self)
+ OpenRTM_aist.ExecutionContextBase.exit(self)
return
def init(self, props):
Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py 2017-10-02 08:46:51 UTC (rev 878)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/RTObject.py 2017-10-03 00:47:12 UTC (rev 879)
@@ -3559,14 +3559,14 @@
def finalizeContexts(self):
self._rtcout.RTC_TRACE("finalizeContexts()")
len_ = len(self._eclist)
- for i in range(len_):
- idx = (len_ - 1) - i
- self._eclist[idx].stop()
+ for ec in self._eclist:
+ ec.stop()
try:
- self._poa.deactivate_object(self._poa.servant_to_id(self._eclist[idx]))
+ self._poa.deactivate_object(self._poa.servant_to_id(ec))
except:
self._rtcout.RTC_TRACE(OpenRTM_aist.Logger.print_exception())
- del self._eclist[idx]
+ ec.exit()
+ self._eclist = []
return
More information about the openrtm-commit
mailing list