thread safe datastructures other than Queue?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bram Stolk

    thread safe datastructures other than Queue?

    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.Semap hore() 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: bram@nospam.sar a.nl 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
    ------------------------------------------------------------------------------
Working...