]> granicus.if.org Git - python/commitdiff
Merged revisions 76148 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 8 Nov 2009 00:36:33 +0000 (00:36 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 8 Nov 2009 00:36:33 +0000 (00:36 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76148 | antoine.pitrou | 2009-11-08 01:24:12 +0100 (dim., 08 nov. 2009) | 4 lines

  Kill a small potential leak in test_threading.
  The leak may not manifest itself if the OS re-uses the same thread ids
  (I suppose Neal's machine doesn't :-))
........

Lib/test/test_threading.py

index e9ff4cac88f7d165f3f7da76483bea775dd87c3c..04e37a786bcc261f87b84d8962246bea0dc9823a 100644 (file)
@@ -100,6 +100,8 @@ class ThreadTests(unittest.TestCase):
         thread.start_new_thread(f, ())
         done.wait()
         self.assertFalse(ident[0] is None)
+        # Kill the "immortal" _DummyThread
+        del threading._active[ident[0]]
 
     # run with a small(ish) thread stack size (256kB)
     def test_various_ops_small_stack(self):