Increment the counter with locking
(self,delta=1)
| 9 | self._value_lock = threading.Lock() |
| 10 | |
| 11 | def incr(self,delta=1): |
| 12 | ''' |
| 13 | Increment the counter with locking |
| 14 | ''' |
| 15 | with self._value_lock: |
| 16 | self._value += delta |
| 17 | |
| 18 | def decr(self,delta=1): |
| 19 | ''' |