Critical sections and mutexes

Skip Montanaro skip at pobox.com
Tue Oct 23 16:04:11 EDT 2001


    >> self.Q = PriorityQueue()
    ..
    Cliff> I would put a threading.Lock() in PriorityQueue that controls
    Cliff> access to it, something like this:
    ...

Sorry to drop in late on this thread, but why not simply make PriorityQueue
a subclass of Queue.Queue (which already does all the locking for you)?

-- 
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list