[pypy-commit] pypy default: Kill a method not used any more, and fix the comment.

arigo noreply at buildbot.pypy.org
Thu May 3 10:42:19 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r54883:a8bbe642cb67
Date: 2012-05-03 10:41 +0200
http://bitbucket.org/pypy/pypy/changeset/a8bbe642cb67/

Log:	Kill a method not used any more, and fix the comment.

diff --git a/pypy/module/thread/gil.py b/pypy/module/thread/gil.py
--- a/pypy/module/thread/gil.py
+++ b/pypy/module/thread/gil.py
@@ -5,7 +5,7 @@
 # This module adds a global lock to an object space.
 # If multiple threads try to execute simultaneously in this space,
 # all but one will be blocked.  The other threads get a chance to run
-# from time to time, using the hook yield_thread().
+# from time to time, using the periodic action GILReleaseAction.
 
 from pypy.module.thread import ll_thread as thread
 from pypy.module.thread.error import wrap_thread_error
@@ -51,8 +51,6 @@
             self.gil_ready = False
             self.setup_threads(space)
 
-    def yield_thread(self):
-        do_yield_thread()
 
 class GILReleaseAction(PeriodicAsyncAction):
     """An action called every sys.checkinterval bytecodes.  It releases
diff --git a/pypy/module/thread/test/test_gil.py b/pypy/module/thread/test/test_gil.py
--- a/pypy/module/thread/test/test_gil.py
+++ b/pypy/module/thread/test/test_gil.py
@@ -55,7 +55,7 @@
                 assert state.datalen3 == len(state.data)
                 assert state.datalen4 == len(state.data)
                 debug_print(main, i, state.datalen4)
-                state.threadlocals.yield_thread()
+                gil.do_yield_thread()
                 assert i == j
                 j += 1
         def bootstrap():


More information about the pypy-commit mailing list