[pypy-svn] r30497 - in pypy/dist/pypy/module/_stackless: . test

auc at codespeak.net auc at codespeak.net
Tue Jul 25 10:36:31 CEST 2006


Author: auc
Date: Tue Jul 25 10:36:28 2006
New Revision: 30497

Modified:
   pypy/dist/pypy/module/_stackless/interp_clonable.py
   pypy/dist/pypy/module/_stackless/test/test_interp_coroutine.py
Log:
import op. error, adapt fork

Modified: pypy/dist/pypy/module/_stackless/interp_clonable.py
==============================================================================
--- pypy/dist/pypy/module/_stackless/interp_clonable.py	(original)
+++ pypy/dist/pypy/module/_stackless/interp_clonable.py	Tue Jul 25 10:36:28 2006
@@ -6,6 +6,7 @@
 from pypy.interpreter.function import StaticMethod
 from pypy.interpreter.typedef import GetSetProperty, TypeDef
 from pypy.interpreter.gateway import interp2app, ObjSpace, W_Root
+from pypy.interpreter.error import OperationError
 
 from pypy.rpython import rstack # for resume points
 from pypy.tool import stdlib_opcode as pythonopcode
@@ -268,11 +269,11 @@
     into the parent first, which can switch to the child later.
     """
     #XXX ClonableCoroutine might well be InterpClonableCoroutine
-    current = ClonableCoroutine.getcurrent()
-    if not isinstance(current, ClonableCoroutine):
+    current = InterpClonableCoroutine.getcurrent()
+    if not isinstance(current, InterpClonableCoroutine):
         raise RuntimeError("fork() in a non-clonable coroutine")
     thunk = ForkThunk(current)
-    coro_fork = ClonableCoroutine() 
+    coro_fork = InterpClonableCoroutine() 
     coro_fork.bind(thunk)
     coro_fork.switch()
     # we resume here twice.  The following would need explanations about

Modified: pypy/dist/pypy/module/_stackless/test/test_interp_coroutine.py
==============================================================================
--- pypy/dist/pypy/module/_stackless/test/test_interp_coroutine.py	(original)
+++ pypy/dist/pypy/module/_stackless/test/test_interp_coroutine.py	Tue Jul 25 10:36:28 2006
@@ -12,7 +12,7 @@
     os.write(2, stuff + '\n')
 
 class _TestCoroutine(StacklessTest):
-    backendopt = True
+    #backendopt = True
     Coroutine = Coroutine
 
     def setup_method(self, method):



More information about the Pypy-commit mailing list