[pypy-svn] r7281 - pypy/trunk/src/goal

mgedmin at codespeak.net mgedmin at codespeak.net
Tue Nov 16 12:33:44 CET 2004


Author: mgedmin
Date: Tue Nov 16 12:33:44 2004
New Revision: 7281

Modified:
   pypy/trunk/src/goal/translate_pypy.py
Log:
Use threading to start the PDB thread.  The effect of this change is that
closing the PyGame window will not abort the debugger session and therefore
will not leave the terminal in inconsistent state.



Modified: pypy/trunk/src/goal/translate_pypy.py
==============================================================================
--- pypy/trunk/src/goal/translate_pypy.py	(original)
+++ pypy/trunk/src/goal/translate_pypy.py	Tue Nov 16 12:33:44 2004
@@ -72,10 +72,13 @@
             print '-'*60
         
         print >> sys.stderr
-        import thread
+        import threading
         import pdb
-        thread.start_new_thread(pdb.post_mortem, (tb,))
+        t = threading.Thread(target=pdb.post_mortem, args=(tb,))
+        t.start()
         run_server()
+        import pygame
+        pygame.quit()
 
     try:
         analyse()



More information about the Pypy-commit mailing list