Author: Armin Rigo <[email protected]>
Branch: stm-thread-2
Changeset: r61234:e090ba752fa1
Date: 2013-02-14 12:15 +0100
http://bitbucket.org/pypy/pypy/changeset/e090ba752fa1/
Log: Avoid renaming the module on import; there is not really a point
here now.
diff --git a/pypy/module/thread/stm.py b/pypy/module/thread/stm.py
--- a/pypy/module/thread/stm.py
+++ b/pypy/module/thread/stm.py
@@ -4,7 +4,7 @@
from pypy.module.thread.threadlocals import OSThreadLocals
from pypy.module.thread.error import wrap_thread_error
-from rpython.rlib import rthread as thread
+from rpython.rlib import rthread
from rpython.rlib import rstm
from rpython.rlib.objectmodel import invoke_around_extcall
@@ -44,21 +44,21 @@
rstm.set_transaction_length(interval)
-class STMLock(thread.Lock):
+class STMLock(rthread.Lock):
def __init__(self, space, ll_lock):
- thread.Lock.__init__(self, ll_lock)
+ rthread.Lock.__init__(self, ll_lock)
self.space = space
def acquire(self, flag):
if rstm.is_atomic():
- acquired = thread.Lock.acquire(self, False)
+ acquired = rthread.Lock.acquire(self, False)
if flag and not acquired:
raise wrap_thread_error(self.space,
"deadlock: an atomic transaction tries to acquire "
"a lock that is already acquired. See pypy/doc/stm.rst.")
else:
- acquired = thread.Lock.acquire(self, flag)
+ acquired = rthread.Lock.acquire(self, flag)
return acquired
def allocate_stm_lock(space):
- return STMLock(space, thread.allocate_ll_lock())
+ return STMLock(space, rthread.allocate_ll_lock())
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit