[openrtm-commit:03059] r1097 - trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/Throughput
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 1月 10日 (水) 14:52:11 JST
Author: t-katami
Date: 2018-01-10 14:52:11 +0900 (Wed, 10 Jan 2018)
New Revision: 1097
Modified:
trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/Throughput/ThroughputImpl.java
Log:
[compat,example,->RELENG_1_2] Fixed the bug ThroughputRTC. refs #4397
Modified: trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/Throughput/ThroughputImpl.java
===================================================================
--- trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/Throughput/ThroughputImpl.java 2018-01-10 02:19:32 UTC (rev 1096)
+++ trunk/OpenRTM-aist-Java/jp.go.aist.rtm.RTC/src/RTMExamples/Throughput/ThroughputImpl.java 2018-01-10 05:52:11 UTC (rev 1097)
@@ -343,7 +343,8 @@
if (getInPortConnectorSize() == 0) {
- super.exit();
+ Thread async = new Thread(new func_exit(this));
+ async.start();
}
return super.onDeactivated(ec_id);
}
@@ -380,7 +381,7 @@
dataSize = dataSize + increment.getValue();
} else {
if((long)sendCount > maxSend.getValue()) {
- exit();
+ deactivate(ec_id);
return ReturnCode_t.RTC_OK;
}
}
@@ -593,12 +594,9 @@
recordNum = 0;
recordPtr = 0;
if (seqLength < seqSize) {
- super.exit();
-/*
- coil::Async* async;
- async = coil::AsyncInvoker(this, std::mem_fun(&Throughput::exit));
- async->invoke();
-*/
+ Thread async = new Thread(new func_exit(this));
+ async.start();
+ return;
}
}
// measuring latency
@@ -757,6 +755,18 @@
private int recordNum = 0;
private int recordPtr = 0;
+ class func_exit implements Runnable{
+ public func_exit(ThroughputImpl comp){
+ this.obj = comp;
+ }
+
+ @Override
+ public void run() {
+ obj.exit();
+ }
+ ThroughputImpl obj;
+ }
+
class DataListener<DataType> extends ConnectorDataListenerT<DataType>{
public DataListener(ThroughputImpl comp, Class cl){
super(cl);
More information about the openrtm-commit
mailing list