From: Aahz > On Mon, Jul 19, 2004, Phillip J. Eby wrote: >> >> However, anything that calls back into Python code isn't necessarily >> atomic, and in general, almost anything can call back into Python code. > > Yup. >> For example, the seemingly harmless dictionary item assignment can call >> back into Python for a custom type's __hash__ and __eq__ methods, so could >> it be that a thread switch could actually occur during this statement: >> >> foo[bar] = baz >> >> if 'bar' has such custom methods? Maybe I'm wrong, and the GIL is still >> held in such a case, but I'm not sure *how*. > No, it isn't. Hmm. I think that makes the point fairly well - thread safety is subtle, and not to be taken lightly. Whether that was Raymond's point or mine, I'm less sure :-) I'll take Raymond's suggestion and see if I can come up with a relatively succinct description of thread safety which would be suitable as a glossary entry. Paul. __________________________________________________________________________ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __________________________________________________________________________
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4