threads, mutual exclusion, and lists

Scott smbaker at gmail.com
Wed Aug 15 15:36:23 EDT 2007


I have two threads that share a python list. One thread adds to the
list with append(), the other thread removes items with pop().

My question is -- are python list operations atomic? If they are not,
then I assume I need to put some mutual exclusion around the append()
and pop() calls ?

Thanks,
Scott




More information about the Python-list mailing list