Threads and variable assignment
elbertlev at hotmail.com
elbertlev at hotmail.com
Mon Apr 11 23:39:12 EDT 2005
Theoretically you have to use lock, while accesing the isgood instance,
but... practically noting bad can happen IN THIS PARTICULAR CASE, if
you don't. Python uses Global Interpreter Lock. In other words only
one thread is running at any particular moment. Thread scheduling is
preemptive, but "atomic" actions are not interrupted. Bollean asigment
is an atomic action.
WELCOME TO THE POWER OF MULTITHREADING :)
More information about the Python-list
mailing list