[Python-bugs-list] [ python-Bugs-535495 ] threading.RLock memory leak

noreply@sourceforge.net noreply@sourceforge.net
Tue, 26 Mar 2002 16:25:25 -0800


Bugs item #535495, was opened at 2002-03-27 00:25
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=535495&group_id=5470

Category: Threads
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Shane Green (shanegreen)
Assigned to: Nobody/Anonymous (nobody)
Summary: threading.RLock memory leak

Initial Comment:
each time a new thread acquires an rlock for the first
time it seems a Condition and a Dummy thread are
allocated to it.  If that thread then dies, the
condition and dummy are never cleaned up.  The code
snipit below will leave 100 instances of Condition and
DummyThread in memory.




import threading
import thread

_lock = threading.RLock()
def run():
  _lock.acquire()
  _lock.release()

for x in range(0, 100):
  thread.start_new_thread(run, ())

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=535495&group_id=5470