[pypy-svn] r56147 - pypy/branch/async-del/pypy/module/thread

arigo at codespeak.net arigo at codespeak.net
Sat Jun 28 12:25:08 CEST 2008


Author: arigo
Date: Sat Jun 28 12:25:06 2008
New Revision: 56147

Modified:
   pypy/branch/async-del/pypy/module/thread/threadlocals.py
Log:
Remove debugging prints.


Modified: pypy/branch/async-del/pypy/module/thread/threadlocals.py
==============================================================================
--- pypy/branch/async-del/pypy/module/thread/threadlocals.py	(original)
+++ pypy/branch/async-del/pypy/module/thread/threadlocals.py	Sat Jun 28 12:25:06 2008
@@ -7,7 +7,6 @@
     os_thread.bootstrap()."""
 
     def __init__(self):
-        print 'FRESH NEW THREADLOCALS'
         self._valuedict = {}   # {thread_ident: ExecutionContext()}
         self._mainthreadident = 0
         self._mostrecentkey = 0        # fast minicaching for the common case
@@ -17,19 +16,16 @@
         ident = thread.get_ident()
         if ident == self._mostrecentkey:
             result = self._mostrecentvalue
-            print '(cached)',
         else:
             value = self._valuedict.get(ident, None)
             # slow path: update the minicache
             self._mostrecentkey = ident
             self._mostrecentvalue = value
             result = value
-        print '%d => %r' % (ident, result)
         return result
 
     def setvalue(self, value):
         ident = thread.get_ident()
-        print 'SET %d => %r' % (ident, value)
         if value is not None:
             if len(self._valuedict) == 0:
                 self._mainthreadident = ident
@@ -42,7 +38,6 @@
         # update the minicache to prevent it from containing an outdated value
         self._mostrecentkey = ident
         self._mostrecentvalue = value
-        print self._valuedict
 
     def getmainthreadvalue(self):
         ident = self._mainthreadident
@@ -51,14 +46,12 @@
     def enter_thread(self, space):
         "Notification that the current thread is just starting."
         ec = space.getexecutioncontext()
-        print 'ENTER_THREAD', thread.get_ident(), ec
         ec.thread_exit_funcs = []
 
     def leave_thread(self, space):
         "Notification that the current thread is about to stop."
         try:
             ec = space.getexecutioncontext()
-            print 'LEAVE_THREAD', thread.get_ident(), ec
             while ec.thread_exit_funcs:
                 exit_func, w_obj = ec.thread_exit_funcs.pop()
                 exit_func(w_obj)



More information about the Pypy-commit mailing list