[pypy-svn] r55436 - pypy/dist/pypy/tool
fijal at codespeak.net
fijal at codespeak.net
Fri May 30 22:57:43 CEST 2008
Author: fijal
Date: Fri May 30 22:57:39 2008
New Revision: 55436
Modified:
pypy/dist/pypy/tool/tls.py
Log:
Really use tlsobject
Modified: pypy/dist/pypy/tool/tls.py
==============================================================================
--- pypy/dist/pypy/tool/tls.py (original)
+++ pypy/dist/pypy/tool/tls.py Fri May 30 22:57:39 2008
@@ -1,26 +1,8 @@
-##"""Thread-local storage."""
-##
-##try:
-## from thread import _local as tlsobject
-##except ImportError: # Python < 2.4
-##
-## # XXX needs a real object whose attributes are visible only in
-## # the thread that reads/writes them.
-##
-## import autopath, os
-## filename = os.path.join(os.path.dirname(autopath.pypydir),
-## 'lib-python', '2.4.1', '_threading_local.py')
-## glob = {'__name__': '_threading_local'}
-## execfile(filename, glob)
-## tlsobject = glob['local']
-## del glob, filename
+"""Thread-local storage."""
-
-
-
-class tlsobject(object):
- """Storage that is NOT THREAD-LOCAL AT ALL because we don't really need it
- at the moment, and it has a performance impact -- a minor one on top of 2.4,
- and an extreme one on top of 2.3 :-(((((
- """
+try:
+ from thread import _local as tlsobject
+except ImportError:
+ class tlsobject(object):
+ pass
More information about the Pypy-commit
mailing list