Threads

Robert Cunningham r.j.cunningham at virgin.net
Sat May 18 09:06:24 EDT 2002


Hopefully someone can clarify this for me, I have n threads running and a global
var c now sometimes these threads may update c (c += 1 or c -= 1). My question
is do I need to use a lock or something, at the moment I don't, I assumed += is
'atomic' - am I right??

Cheers,

Rob





More information about the Python-list mailing list