def unlock(self): if self.locked==False: return 0 rv = possem.sem_post(self.sem) if rv==0: self.locked=False return rv
def unlock(self): return possem.sem_post(self.sem)
def unlock(self): if self.locked == False: return 0 rv = possem.sem_post(self.sem) if rv == 0: self.locked = False return rv