[pypy-commit] pypy default: document the thread-safely issue of _collections.py
arigo
pypy.commits at gmail.com
Thu Jan 19 11:15:35 EST 2017
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r89674:0ef49555300c
Date: 2017-01-19 17:14 +0100
http://bitbucket.org/pypy/pypy/changeset/0ef49555300c/
Log: document the thread-safely issue of _collections.py
diff --git a/lib_pypy/_collections.py b/lib_pypy/_collections.py
--- a/lib_pypy/_collections.py
+++ b/lib_pypy/_collections.py
@@ -1,13 +1,18 @@
"""High performance data structures
+
+Note that PyPy also contains a built-in module '_collections' which will hide
+this one if compiled in.
+
+THIS ONE IS BOGUS in the sense that it is NOT THREAD-SAFE! It is provided
+only as documentation nowadays. Please don't run in production a PyPy
+without the '_collections' built-in module. The built-in module is
+correctly thread-safe, like it is on CPython.
"""
#
# Copied and completed from the sandbox of CPython
# (nondist/sandbox/collections/pydeque.py rev 1.1, Raymond Hettinger)
#
-# Note that PyPy also contains a built-in module '_collections' which will hide
-# this one if compiled in.
-
try:
from threading import _get_ident as _thread_ident
except ImportError:
More information about the pypy-commit
mailing list