1. Stephen Tu
  2. mino-pypy

Source

mino-pypy / pypy / module / thread / test / support.py

Author Commit Message Date Builds
Alex Gaynor
fix thread tests
Branches
kill-faking
Amaury Forgeot d'Arc
Only export cls.runappdirect instead of the whole option object.
Amaury Forgeot d'Arc
progress
Antonio Cuni
we need signal for these tests
Amaury Forgeot d'Arc
Quit the "timeout killer" thread as soon as the process exits. Otherwise it may stay too long and other tests will count it among the active threads...
Alex Gaynor
Fixed thread tests.
Alex Gaynor
Fix thread tests.
Amaury Forgeot d'Arc
A failing test which shows why test_multiprocessing hangs on startup...
Branches
fast-forward
Armin Rigo
The app-level time.sleep() doesn't release the GIL, and there is little chance that we'll fix it when running on top of py.py. Simple workaround.
Armin Rigo
These tests are quite slow. One of them timed out on wyvern, so I'm adding a way to increase the default timeout again...
Samuele Pedroni
make module/thread tests work with pypy-c py.test -A too.
Armin Rigo
Hackish pseudo-solution to release the GIL around a call to time.sleep(). Simplifies testing too.
Armin Rigo
threads: use the value specified in sys.setcheckinterval() as intended, to only release the GIL every nth bytecode. For now, the thread tests must force a sys.setcheckinterval(1). This is not particularly elegant and quite fragile until, and if, we have a way to release the GIL around system calls in py.py.
Armin Rigo
Some tentative clean-ups of conftest.py w.r.t. object space creation and caching. Now the gettestobjspace() function takes an optional name 'std'/'thunk' as before, but also keyword options to pass to the space. The result is cached. As far as I can tell there was already no difference left between getobjspace() and gettestobjspace(). For interp-level test classes, 'cls.space' attribute is now lazily computed the first time the attribute is actually accessed. This is cool when working on parts of PyPy that don't need an object space around, or that only need a custom one (e.g. with a usemodules keyword).
Armin Rigo
(pedronis, arigo) For the translated PyPy, we need to be extra super careful about making thread.start_new_thread() thread-safe (argh).
Armin Rigo
The 'thread' module implemented with OS threads and a Global Interpreter Lock (as in CPython). Must be selected with --usemodules=thread. Very occasionally, one test fails. Hard to figure out what's wrong :-( The GIL itself is further separated from the rest of the code, which is about using OS threads and locks. It's almost completely isolated in gil.py. The 'thread._local' class is much nicer than in CPython: thanks to the getdict() method on all w_ objects, we can do the "right thin…