thread safe datastructures other than Queue?

B

Bram Stolk

Hello,


Python features the Queue.Queue object that provides thread-safe access.
What if I want thread access to other types of datastructures?

Would I need to pair e.g. each list, Set or hashmap with its own
threading.Semaphore() object?

Or is there an easier way to have thread-safe access to datastructures?

Thanks,

Bram Stolk

--
------------------------------------------------------------------------------
Bram Stolk, VR Engineer.
SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM
email: (e-mail address removed) Phone +31-20-5923059 Fax +31-20-6683167

"Software is math. Math is not patentable."
OR
"Software is literature. Literature is not patentable." -- slashdot comment
------------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top