Exemplo n.º 1
0
 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()
Exemplo n.º 2
0
 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()