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>
This commit is contained in:
YAMAMOTO Takashi 2013-04-25 16:08:26 +09:00 committed by FUJITA Tomonori
parent fe6f94434c
commit 71aa062c49

View File

@ -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))