Re: [LAD] [somewhat OT] semaphores in python

From: Tim Goetze <tim@email-addr-hidden>
Date: Tue Aug 26 2008 - 23:12:54 EEST

[Fons Adriaensen]
>Does anyone know of a counting semaphare class/module
>in Python ? Given the lock provided by the built-in
>thread module it seems impossible to implement this
>(it does support multiple waiters which I don't need,
>but definitely is not counting). This also means that
>whatever is defined in the threading module can't be
>what I want.

Perhaps I don't quite understand your needs, but the standard
Semaphore object in the threading module claims to support counting:

http://docs.python.org/lib/semaphore-objects.html

I haven't used it myself yet but the Python docs have never promised
me anything that didn't work as described (yay!). I guess I must be
missing something.

Cheers, Tim
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Wed Aug 27 00:15:06 2008

This archive was generated by hypermail 2.1.8 : Wed Aug 27 2008 - 00:15:06 EEST