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

2008-08-26 Thread Arnold Krille
Am Dienstag, 26. August 2008 schrieb 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

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

2008-08-26 Thread Tim Goetze
[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

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

2008-08-26 Thread Dominic Sacré
On Tuesday 26 August 2008 22:01:18 Fons Adriaensen wrote: AFAICS, for this reason, whatever happens in threading can't be correct, or at least not pre-emption and SMP safe. Is this really an issue in Python? The Python interpreter is not thread safe anyway, there's a global interpreter lock

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

2008-08-26 Thread Fons Adriaensen
On Tue, Aug 26, 2008 at 11:02:37PM +0200, Dominic Sacré wrote: Is this really an issue in Python? The Python interpreter is not thread safe anyway, there's a global interpreter lock that must be held by any thread accessing Python objects. Depending on what you're trying to do, this might

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

2008-08-26 Thread Robin Gareus
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Fons Adriaensen wrote: On Tue, Aug 26, 2008 at 11:02:37PM +0200, Dominic Sacr� wrote: Is this really an issue in Python? The Python interpreter is not thread safe anyway, there's a global interpreter lock that must be held by any thread