On Wed, 6 Sep 2017 11:26:52 +0900
INADA Naoki <songofaca...@gmail.com> wrote:
> 
> Like that, should we say "atomic & threadsafe __setitem__ for simple
> key is implementation detail of CPython and PyPy.  We recommend
> using mutex when using OrderedDict from multiple thread."?

I think you may be overstating the importance of making OrderedDict
thread-safe.  It's quite rare to be able to rely on the thread safety
of a single structure, since most often your state is more complex than
that and you have to use a lock anyway.

The statu quo is that only experts rely on the thread-safety of list
and dict, and they should be ready to reconsider if some day the
guarantees change.

Regards

Antoine.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to