class Semaphore(): def __init__(self, count=1, **kwargs): self.semaphore = DSemaphore(count) def __repr__(self, **kwargs): return repr(self.semaphore) def acquire(self, **kwargs): try: return self.semaphore.acquire(kwargs) except Exception as e: raise e def release(self, **kwargs): try: return self.semaphore.release(kwargs) except Exception as e: raise e def __str__(self, **kwargs): return str(self.semaphore)
class Semaphore(): def __init__(self, count=1): self.semaphore = DSemaphore(count) def __repr__(self): return repr(self.semaphore) def acquire(self, _concoord_command): try: return self.semaphore.acquire(_concoord_command) except Exception as e: raise e def release(self, _concoord_command): try: return self.semaphore.release(_concoord_command) except Exception as e: raise e def __str__(self): return str(self.semaphore)
def __init__(self, count=1, **kwargs): self.semaphore = DSemaphore(count)
def __init__(self, count=1): self.semaphore = DSemaphore(count)