class Async::Semaphore
def acquire
@yields {...} When the semaphore can be acquired.
If no block is provided, you must call release manually.
Acquire the semaphore, block if we are at the limit.
def acquire wait @count += 1 return unless block_given? begin return yield ensure self.release end end