summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>2013-04-25 16:08:26 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-05-01 22:18:40 +0900
commit71aa062c496d3d25a76c379dacafcc5771d54ae8 (patch)
treeb7137e5ec164595f04ff244aabc1fb6fe9b06dc1
parentfe6f94434cf968c2fb836cb0d29dfded40e468fc (diff)
limit the size of ryu app's event queue
otherwise a queue grows too long and consumes much memory on load. the size used in this commit (128) is arbitrary. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/base/app_manager.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ryu/base/app_manager.py b/ryu/base/app_manager.py
index 5d241cea..173e35c7 100644
--- a/ryu/base/app_manager.py
+++ b/ryu/base/app_manager.py
@@ -60,7 +60,7 @@ class RyuApp(object):
self.event_handlers = {}
self.observers = {}
self.threads = []
- self.events = hub.Queue()
+ self.events = hub.Queue(128)
self.replies = hub.Queue()
self.logger = logging.getLogger(self.name)
self.threads.append(hub.spawn(self._event_loop))