basic python threading question
Aahz Maruch
aahz at panix.com
Fri Sep 29 12:53:09 EDT 2000
In article <q_IA5.42927$dZ2.15588642 at news3.rdc1.on.home.com>,
Tom <nospam at nospam.com> wrote:
>
>This would be a problem for threading, unless all atomic objects are
>thead-safe. Now, all atomic objects appear to me to be immutable. Are
>immutable objects inherently thread-safe in Python (even if the ref count
>change)?
Yes, immutable objects are thread-safe. Remember that assignment in
Python is a binding operation, not a modification operation.
--
--- Aahz (Copyright 2000 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
"Perhaps God rewards martyrs, but life seldom does..." --Ulrika O'Brien
More information about the Python-list
mailing list