def allocate_lock():
    return coros.semaphore(1, 9999)
Beispiel #2
0
 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()
def allocate_lock():
    return coros.semaphore(1, 9999)