diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | eventlet/timer.py | 4 | ||||
-rw-r--r-- | setup.py | 2 |
3 files changed, 7 insertions, 1 deletions
@@ -5,6 +5,8 @@ Fixes some long-standing bugs where sometimes failures in accept() or connect() 0.6.1: Added eventlet.tpool.killall. Blocks until all of the threadpool threads have been told to exit and join()ed. Meant to be used to clean up the threadpool on exit or if calling execv. Used by Spawning. +0.6.2: Fix a major memory leak when using the libevent or libev hubs. Timers were not being removed from the hub after they fired. (Thanks Agusto Becciu). + 0.5.x ===== diff --git a/eventlet/timer.py b/eventlet/timer.py index 6e41a18..1018320 100644 --- a/eventlet/timer.py +++ b/eventlet/timer.py @@ -40,6 +40,7 @@ class Timer(object): This timer will not be run unless it is scheduled in a runloop by calling timer.schedule() or runloop.add_timer(timer). """ + self.impltimer = None self.cancelled = False self.seconds = seconds self.tpl = cb, args, kw @@ -72,6 +73,9 @@ class Timer(object): def __call__(self, *args): if not self.called: self.called = True + if self.impltimer is not None: + del get_hub().timers_by_greenlet[self.greenlet][self] + cb, args, kw = self.tpl cb(*args, **kw) @@ -6,7 +6,7 @@ from setuptools import find_packages, setup setup( name='eventlet', - version='0.6.1', + version='0.6.2pre', description='Coroutine-based networking library', author='Linden Lab', author_email='eventletdev@lists.secondlife.com', |