From 71aa062c496d3d25a76c379dacafcc5771d54ae8 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 25 Apr 2013 16:08:26 +0900 Subject: 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 Signed-off-by: FUJITA Tomonori --- ryu/base/app_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.3