On Feb 24, 8:57 pm, Christian Heimes <li...@cheimes.de> wrote: > birdsong wrote: > > I searched but didn't see this already discussed, sorry if I didn't > > search hard enough. > > > Can I decrement a semaphore's counter within the same thread more than > > once? I'd like to set hard and soft limits in a server I'm writing. > > The server upon initialization would create a semaphore: > > > threading.Semaphore(100) > > Yes, you are not restricted to multiple threads. A semaphore ensures > that the counter is thread safe. It doesn't force you to use threads. > > Christian
ahh good. there will be multiple threads accessing, but yes i follow now. i guess this would have been pretty easy to test in the shell. muchas gracias. -- http://mail.python.org/mailman/listinfo/python-list