Preventing tread collisions

Ian Kelly ian.g.kelly at gmail.com
Wed Dec 12 15:58:33 EST 2012


On Wed, Dec 12, 2012 at 1:53 PM, MRAB <python at mrabarnett.plus.com> wrote:
> You could try a non-blocking semaphore:
>
> def __init__(self):
>     self.cameraActive = Semaphore()

Why a Semaphore and not just a plain old Lock?



More information about the Python-list mailing list