[openrtm-commit:01626] r729 - in branches/RELENG_1_1: . jp.go.aist.rtm.RTC jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2015年 10月 28日 (水) 09:51:38 JST
Author: kawauchi
Date: 2015-10-28 09:51:37 +0900 (Wed, 28 Oct 2015)
New Revision: 729
Modified:
branches/RELENG_1_1/
branches/RELENG_1_1/jp.go.aist.rtm.RTC/
branches/RELENG_1_1/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java
Log:
[compat,merge] r622 merged from trunk.
Property changes on: branches/RELENG_1_1
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/RELENG_1_0_0:60-401
/branches/work/ForComponentActionListener:521-522
/branches/work/ForComponentObserverConsumer:534-543
/branches/work/ForConfigurationListener:524-526
/branches/work/ForLogFormat:518-519
/branches/work/ForPortConnectListener:528-532
/branches/work/ForSDOServiceAdminClass:505-507
/branches/work/SourceSharing:591-603
/branches/work/ToGetProperties:545-548
/branches/work/ToIFR_ID:509-514
+ /branches/RELENG_1_0_0:60-401
/branches/work/ForComponentActionListener:521-522
/branches/work/ForComponentObserverConsumer:534-543
/branches/work/ForConfigurationListener:524-526
/branches/work/ForLogFormat:518-519
/branches/work/ForPortConnectListener:528-532
/branches/work/ForSDOServiceAdminClass:505-507
/branches/work/SourceSharing:591-603
/branches/work/ToGetProperties:545-548
/branches/work/ToIFR_ID:509-514
/trunk:622
Property changes on: branches/RELENG_1_1/jp.go.aist.rtm.RTC
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/RELENG_1_0/jp.go.aist.rtm.RTC:408-498
/branches/RELENG_1_0_0/jp.go.aist.rtm.RTC:60-401
/branches/work/ForComponentActionListener/jp.go.aist.rtm.RTC:521-522
/branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC:534-543
/branches/work/ForConfigurationListener/jp.go.aist.rtm.RTC:524-526
/branches/work/ForLogFormat/jp.go.aist.rtm.RTC:518-519
/branches/work/ForPortConnectListener/jp.go.aist.rtm.RTC:528-532
/branches/work/ForSDOServiceAdminClass/jp.go.aist.rtm.RTC:505-507
/branches/work/SourceSharing/jp.go.aist.rtm.RTC:591-603
/branches/work/ToGetProperties/jp.go.aist.rtm.RTC:545-548
/branches/work/ToIFR_ID/jp.go.aist.rtm.RTC:509-514
+ /branches/RELENG_1_0/jp.go.aist.rtm.RTC:408-498
/branches/RELENG_1_0_0/jp.go.aist.rtm.RTC:60-401
/branches/work/ForComponentActionListener/jp.go.aist.rtm.RTC:521-522
/branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC:534-543
/branches/work/ForConfigurationListener/jp.go.aist.rtm.RTC:524-526
/branches/work/ForLogFormat/jp.go.aist.rtm.RTC:518-519
/branches/work/ForPortConnectListener/jp.go.aist.rtm.RTC:528-532
/branches/work/ForSDOServiceAdminClass/jp.go.aist.rtm.RTC:505-507
/branches/work/SourceSharing/jp.go.aist.rtm.RTC:591-603
/branches/work/ToGetProperties/jp.go.aist.rtm.RTC:545-548
/branches/work/ToIFR_ID/jp.go.aist.rtm.RTC:509-514
/trunk/jp.go.aist.rtm.RTC:622
Modified: branches/RELENG_1_1/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java
===================================================================
--- branches/RELENG_1_1/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java 2015-03-09 06:30:07 UTC (rev 728)
+++ branches/RELENG_1_1/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/Manager.java 2015-10-28 00:51:37 UTC (rev 729)
@@ -46,6 +46,19 @@
*/
public class Manager {
+ private class SignalAction extends Thread {
+ public SignalAction() {
+ super();
+ }
+ public void run(){
+ terminate();
+ try {
+ Thread.sleep(100);
+ }catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
/**
* {@.ja コンストラクタ。}
* {@.en Constructor}
@@ -61,6 +74,7 @@
rtcout = new Logbuf("Manager");
m_runner = null;
m_terminator = null;
+ Runtime.getRuntime().addShutdownHook(new SignalAction());
}
/**
@@ -81,6 +95,7 @@
rtcout = new Logbuf("Manager");
m_runner = null;
m_terminator = null;
+ Runtime.getRuntime().addShutdownHook(new SignalAction());
}
/**
@@ -1175,7 +1190,26 @@
synchronized (m_finalized.mutex){
m_finalized.comps.add(comp);
}
+ if (m_timer == null) {
+ cleanupComponents_();
+ }
}
+
+ private void cleanupComponents_() {
+ m_finalizer.exec();
+ }
+ protected class Finalizer implements Runnable {
+ public Finalizer(){
+ }
+ public void exec(){
+ Thread t = new Thread(this);
+ t.start();
+ }
+ public void run(){
+ m_cleanupComponents.doOperate();
+ }
+ }
+ private Finalizer m_finalizer = new Finalizer();
/**
* <p> procComponentArgs </p>
*
@@ -1834,7 +1868,9 @@
protected void shutdownManager() {
rtcout.println(Logbuf.TRACE, "Manager.shutdownManager()");
- m_timer.stop();
+ if (m_timer != null) {
+ m_timer.stop();
+ }
}
/**
* {@.ja Manager の終了のためのリスナークラス}
@@ -2367,7 +2403,7 @@
rtcout.println(Logbuf.DEBUG, "ORB was shutdown.");
rtcout.println(Logbuf.DEBUG, "ORB was destroied.");
- m_pORB.destroy();
+ //m_pORB.destroy();
m_pORB = null;
ORBUtil.clearOrb();
More information about the openrtm-commit
mailing list