>>>>> "Sergei" == Sergei Organov <[EMAIL PROTECTED]> writes:

    Sergei> My answer to OP's question is: use either lock (mutex) or
    Sergei> semaphore.  I'd probably use semaphore as mutexes are
    Sergei> usually optimized for the case when contention probability
    Sergei> is low (i.e., they usually shouldn't be locked for a long
    Sergei> time).

Both Mutexes and Semaphores put the thread to sleep, so I don't think
there will be a big difference.

The OP might also want to check out read/write lock. The first thing
google finds is

http://www.majid.info/mylos/weblog/2004/11/04-1.html

-- 
Ville Vainio   http://tinyurl.com/2prnb
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to