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()
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()