Created
May 18, 2013 17:47
-
-
Save unbit/5605256 to your computer and use it in GitHub Desktop.
better thread attach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 5e25ae4de748 pypy/goal/targetpypystandalone.py | |
--- a/pypy/goal/targetpypystandalone.py Sat May 18 13:31:35 2013 +0200 | |
+++ b/pypy/goal/targetpypystandalone.py Sat May 18 19:46:43 2013 +0200 | |
@@ -129,7 +129,12 @@ | |
@entrypoint('main', [], c_name='pypy_thread_attach') | |
def pypy_thread_attach(): | |
+ os_thread.setup_threads(space) | |
+ os_thread.bootstrapper.acquire(space, None, None) | |
rthread.gc_thread_start() | |
+ os_thread.bootstrapper.nbthreads += 1 | |
+ os_thread.bootstrapper.release() | |
+ rffi.aroundstate.before() | |
w_globals = space.newdict() | |
space.setitem(w_globals, space.wrap('__builtins__'), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment