Author: Taavi Burns <[email protected]>
Branch: stm-thread-2
Changeset: r61233:0378c78cc316
Date: 2013-02-13 15:53 -0500
http://bitbucket.org/pypy/pypy/changeset/0378c78cc316/
Log: Fixes rpython.rlib.thread import.
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 pypy.module.thread import ll_thread
+from rpython.rlib import rthread as thread
from rpython.rlib import rstm
from rpython.rlib.objectmodel import invoke_around_extcall
@@ -44,21 +44,21 @@
rstm.set_transaction_length(interval)
-class STMLock(ll_thread.Lock):
+class STMLock(thread.Lock):
def __init__(self, space, ll_lock):
- ll_thread.Lock.__init__(self, ll_lock)
+ thread.Lock.__init__(self, ll_lock)
self.space = space
def acquire(self, flag):
if rstm.is_atomic():
- acquired = ll_thread.Lock.acquire(self, False)
+ acquired = thread.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 = ll_thread.Lock.acquire(self, flag)
+ acquired = thread.Lock.acquire(self, flag)
return acquired
def allocate_stm_lock(space):
- return STMLock(space, ll_thread.allocate_ll_lock())
+ return STMLock(space, thread.allocate_ll_lock())
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit