Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

One idea is that you could author a threading HOWTO document that covers 
atomicity, locks, queues, reentrancy, etc.  This is a thorny topic and it would 
be nice to have the principles and techniques collected in one place.

Ideally, it would include examples of what to expect in various situations.  
For example, the pure python OrderedDict can be put in an inconsistent state if 
two threads make updates without a mutex; however, the containers implemented 
in C can never be broken even if they don't guarantee atomicity (i.e. a dict 
update making a pure python callback to __hash__ will never result in a broken 
dict).

ISTM that the docs have presumed that people using threading know what they're 
doing; however, we know that isn't always true ;-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35276>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to