Пример #1
0
 def Acquire(self):
     while not self.isFinish() and self.GetVersion() % self.mod != self.res:
         pass
     if self.isFinish():
         return None
     AcquireMemory(self.m_id)
     return self.m_obj
Пример #2
0
 def __enter__(self):
     # print('enter')
     while self.GetVersion() % self.mod != self.res:
         pass
     AcquireMemory(self.m_id)
     return self.m_obj