Member Avatar for ericstern

Hi,
I am learning python coming from a C background and I am trying to understand how python lists work. I took a look at the built in methods, and I am wondering if they are implemented like a linked list. The reason I am wondering this, is because I am wondering that if you can treat it as a queue, where you can push an element and pop one simultaneously with two different threads (safely) without the need of locks, semaphores etc.

No for the multiprocessing module there is the Queue, here looks like being one example, improvement in comments. http://jeetworks.org/node/81 Notice that multiprocessing code must be run directly, it does not run correctly from IDLE.

Member Avatar for ericstern

Thank you very much pyTony!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.