Member Avatar

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.

Recommended Answers

All 2 Replies

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

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, learning, and sharing knowledge.