Decrement the counter with locking
(self,delta=1)
| 16 | self._value += delta |
| 17 | |
| 18 | def decr(self,delta=1): |
| 19 | ''' |
| 20 | Decrement the counter with locking |
| 21 | ''' |
| 22 | with self._value_lock: |
| 23 | self._value -= delta |
| 24 | |
| 25 | def test(c): |
| 26 | for n in range(1000000): |