If the counter reaches zero, future acquire() methods block.
Common use: limiting the number of threads allowed to execute code
sem = threading.Semaphore(5) # No more than 5 threads allowed
def fetch_file(host,filename):
sem.acquire() # Decrements count or blocks if zero
...
blah
...
sem.release() # Increment count