def allocate_lock():
    return coros.semaphore(1, 9999)
예제 #2
0
파일: event.py 프로젝트: woome/drivel
 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)