Later ryu-manager call this method to wait for app loop.
Otherwise ryu-manager exits without waiting for apps.

Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp>

Conflicts:
        ryu/base/app_manager.py
---
 ryu/base/app_manager.py |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ryu/base/app_manager.py b/ryu/base/app_manager.py
index 9709657..42891fc 100644
--- a/ryu/base/app_manager.py
+++ b/ryu/base/app_manager.py
@@ -65,6 +65,9 @@ class RyuApp(object):
         self.logger = logging.getLogger(self.name)
         self.threads.append(hub.spawn(self._event_loop))
 
+    def joinall(self):
+        hub.joinall(self.threads)
+
     def register_handler(self, ev_cls, handler):
         assert callable(handler)
         self.event_handlers.setdefault(ev_cls, [])
@@ -237,3 +240,7 @@ class AppManager(object):
 
         close_all(self.applications)
         close_all(self.contexts)
+
+    def joinall(self):
+        for app in self.applications.values():
+            app.joinall()
-- 
1.7.10.4


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to