예제 #1
0
파일: metrics.py 프로젝트: zwcdp/KBRD
 def _lock(self):
     if hasattr(self.metrics, 'get_lock'):
         # use the shared_table's lock
         return self.metrics.get_lock()
     else:
         # otherwise do nothing
         return no_lock()
예제 #2
0
파일: metrics.py 프로젝트: ahiroto/ParlAI
 def _lock(self):
     if hasattr(self.metrics, 'get_lock'):
         # use the shared_table's lock
         return self.metrics.get_lock()
     else:
         # otherwise do nothing
         return no_lock()