def allocate_lock(): return coros.semaphore(1, 9999)
def __init__(self, procid, publisher): self.events = {} self.procid = procid self.publisher = publisher self.pubsem = coros.semaphore(1)
def test_bounded_with_zero_limit(self): sem = coros.semaphore(0, 0) api.spawn(sem.acquire) sem.release()