------------------------------------------------------------
revno: 1022
committer: Mark Sapiro <[email protected]>
branch nick: 2.2
timestamp: Fri 2008-12-12 20:32:09 -0800
message:
  Cached list instances in the qrunners are never freed because of a self
  reference via self._memberadaptor and a reference to the list in
  OldStyleMemberships.  Changed the OldStyleMemberships reference to a
  weakref.proxy reference to avoid this.
modified:
  Mailman/OldStyleMemberships.py

=== modified file 'Mailman/OldStyleMemberships.py'
--- a/Mailman/OldStyleMemberships.py    2008-06-20 23:20:18 +0000
+++ b/Mailman/OldStyleMemberships.py    2008-12-13 04:32:09 +0000
@@ -25,6 +25,7 @@
 """
 
 import time
+import weakref
 from types import StringType
 
 from Mailman import mm_cfg
@@ -45,7 +46,9 @@
 
 class OldStyleMemberships(MemberAdaptor.MemberAdaptor):
     def __init__(self, mlist):
-        self.__mlist = mlist
+        # Make only a weak reference to the list to avoid locking the list
+        # in the qrunner cache via the self._memberadaptor reference.
+        self.__mlist = weakref.proxy(mlist)
 
     #
     # Read interface



--
Active development version (web u/i update)
https://code.launchpad.net/~mailman-coders/mailman/2.2

You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to