On Aug 15, 1:36 pm, Scott <[EMAIL PROTECTED]> wrote: > 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
You might want to consider using a Queue instead. It is designed to be thread-safe. -- http://mail.python.org/mailman/listinfo/python-list