コード例 #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()