Commit 95a3a6a6 authored by Tim Peters's avatar Tim Peters

Merge rev 40737 from 3.6 branch.

Note that nailing the type of oid to str may allow some
thread simplifications in Connection._invalidated handling.
Thanks to Florent Guillaume for noticing!
parent a3c78848
...@@ -125,6 +125,9 @@ class Connection(ExportImport, object): ...@@ -125,6 +125,9 @@ class Connection(ExportImport, object):
# will execute atomically by virtue of the GIL. But some storage # will execute atomically by virtue of the GIL. But some storage
# might generate oids where hash or compare invokes Python code. In # might generate oids where hash or compare invokes Python code. In
# that case, the GIL can't save us. # that case, the GIL can't save us.
# Note: since that was written, it was officially declared that the
# type of an oid is str. TODO: remove the related now-unnecessary
# critical sections (if any -- this needs careful thought).
self._inv_lock = threading.Lock() self._inv_lock = threading.Lock()
self._invalidated = d = {} self._invalidated = d = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment