Commits

Anonymous committed f3b0015

improved pypy_attach_thread

  • Participants
  • Parent commits 5e25ae4

Comments (0)

Files changed (1)

File pypy/goal/targetpypystandalone.py

 
     @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__'),