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