threads, mutual exclusion, and lists

Matt McCredie mccredie at gmail.com
Thu Aug 16 12:45:46 EDT 2007


> Why do you think they are not?

Because they aren't. You even mentioned that a few operations that
aren't atomic. If operations are atomic it isn't necessarily because
of the design of the list, but the design of CPython. More
specifically the GIL. I don't mean to imply that you can't get a
multi-threaded app to communicate using lists, but the Queue is
explicitly built for it and better suited.

Matt



More information about the Python-list mailing list