Osvaldo Santana Neto added the comment: New version of patch:
1. Use RLock instead of Lock (Mark & Antoine recomendation) 2. Add lock acquire at `__setitem__` and `__delitem__` as following (Mark & Antoine recomendation) 3. Add lock protection in `__repr__` implementation. I've some questions pending: 1. Is it a good idea to wrap self._data access with lock in __getitem__? (I suspect it's not) 2. Is it a good idea to lock protect self.copy() and self.setdefault() (I suspect it's not because both uses __iter__ that is already protected) ---------- Added file: http://bugs.python.org/file46902/fix_os_environ_iter_issue_low_level_thread_lock_2.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30441> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com