[pypy-svn] r45935 - pypy/branch/pypy-more-rtti-inprogress/module/thread/test
arigo at codespeak.net
arigo at codespeak.net
Thu Aug 23 15:47:04 CEST 2007
Author: arigo
Date: Thu Aug 23 15:47:03 2007
New Revision: 45935
Modified:
pypy/branch/pypy-more-rtti-inprogress/module/thread/test/test_ll_thread.py
Log:
Avoid an infinite loop if the test fails by not starting the thread.
Modified: pypy/branch/pypy-more-rtti-inprogress/module/thread/test/test_ll_thread.py
==============================================================================
--- pypy/branch/pypy-more-rtti-inprogress/module/thread/test/test_ll_thread.py (original)
+++ pypy/branch/pypy-more-rtti-inprogress/module/thread/test/test_ll_thread.py Thu Aug 23 15:47:03 2007
@@ -63,7 +63,11 @@
state.done = 0
state.seen_value = 0
g(i)
+ willing_to_wait_more = 1000
while not state.done:
+ willing_to_wait_more -= 1
+ if not willing_to_wait_more:
+ raise Exception("thread didn't start?")
time.sleep(0.01)
assert state.my_thread_ident != main_ident
assert state.seen_value == i
More information about the Pypy-commit
mailing list