| import threading | |
| class Counter: | |
| def __init__(self): | |
| self.count = 0 | |
| def increment(self): | |
| current = self.count | |
| self.count = current + 1 | |
| return self.count | |
| def get_count(self): | |
| return self.count | |
| def decrement(self): | |
| current = self.count | |
| self.count = current - 1 | |
| return self.count | |