[pypy-commit] pypy stdlib-2.7.8: fix deadlock in thread test_fork

bdkearns noreply at buildbot.pypy.org
Wed Aug 27 22:39:17 CEST 2014


Author: Brian Kearns <bdkearns at gmail.com>
Branch: stdlib-2.7.8
Changeset: r73102:c8d88835c602
Date: 2014-08-27 16:38 -0400
http://bitbucket.org/pypy/pypy/changeset/c8d88835c602/

Log:	fix deadlock in thread test_fork

diff --git a/pypy/module/thread/test/test_fork.py b/pypy/module/thread/test/test_fork.py
--- a/pypy/module/thread/test/test_fork.py
+++ b/pypy/module/thread/test/test_fork.py
@@ -13,16 +13,17 @@
             skip("No fork on this platform")
 
         def busy_thread():
+            print 'sleep'
             while run:
                 time.sleep(0)
             done.append(None)
 
-        for i in range(1):
+        for i in range(5):
             run = True
             done = []
             try:
+                print 'sleep'
                 thread.start_new(busy_thread, ())
-                print 'sleep'
 
                 pid = os.fork()
                 if pid == 0:


More information about the pypy-commit mailing list