Critical sections and mutexes

Skip Montanaro skip at
Tue Oct 23 22:04:11 CEST 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

More information about the Python-list mailing list