[pypy-svn] r45914 - pypy/branch/pypy-more-rtti-inprogress/module/thread
fijal at codespeak.net
fijal at codespeak.net
Wed Aug 22 17:50:30 CEST 2007
Author: fijal
Date: Wed Aug 22 17:50:30 2007
New Revision: 45914
Modified:
pypy/branch/pypy-more-rtti-inprogress/module/thread/os_thread.py
Log:
remove thread startup lock
Modified: pypy/branch/pypy-more-rtti-inprogress/module/thread/os_thread.py
==============================================================================
--- pypy/branch/pypy-more-rtti-inprogress/module/thread/os_thread.py (original)
+++ pypy/branch/pypy-more-rtti-inprogress/module/thread/os_thread.py Wed Aug 22 17:50:30 2007
@@ -7,15 +7,11 @@
from pypy.interpreter.gateway import NoneNotWrapped
from pypy.interpreter.gateway import ObjSpace, W_Root, Arguments
-THREAD_STARTUP_LOCK = thread.allocate_lock()
-
-
class Bootstrapper:
_alloc_flavor_ = 'raw'
def bootstrap(self):
space = self.space
- THREAD_STARTUP_LOCK.release()
space.threadlocals.enter_thread(space)
try:
self.run()
@@ -81,15 +77,10 @@
boot.w_callable = w_callable
boot.args = args
- THREAD_STARTUP_LOCK.acquire(True)
-
ident = thread.start_new_thread(Bootstrapper.bootstrap, (boot,))
# wait until the thread has really started and acquired a reference to
# 'boot'.
- THREAD_STARTUP_LOCK.acquire(True)
- THREAD_STARTUP_LOCK.release()
-
return space.wrap(ident)
More information about the Pypy-commit
mailing list