thread safe datastructures other than Queue?

Discussion in 'Python' started by Bram Stolk, May 19, 2004.

  1. Bram Stolk

    Bram Stolk Guest

    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: 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
    ------------------------------------------------------------------------------
     
    Bram Stolk, May 19, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sriram Rajagopalan

    Is STL queue Thread Safe?

    Sriram Rajagopalan, Nov 11, 2004, in forum: C++
    Replies:
    2
    Views:
    6,324
    Stephan Br?nnimann
    Nov 11, 2004
  2. Russell Warren

    Is Queue.Queue.queue.clear() thread-safe?

    Russell Warren, Jun 22, 2006, in forum: Python
    Replies:
    4
    Views:
    699
    Russell Warren
    Jun 27, 2006
  3. Gabriel Rossetti
    Replies:
    0
    Views:
    1,363
    Gabriel Rossetti
    Aug 29, 2008
  4. Kris
    Replies:
    0
    Views:
    504
  5. John Nagle
    Replies:
    5
    Views:
    485
    John Nagle
    Mar 12, 2012
Loading...

Share This Page