MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / dec

Method dec

22_websockets_server/python/atomic.py:17–21  ·  view source on GitHub ↗

Atomically decrement the counter by num and return the new value

(self, num=1)

Source from the content-addressed store, hash-verified

15 return self._value
16
17 def dec(self, num=1):
18 """Atomically decrement the counter by num and return the new value"""
19 with self._lock:
20 self._value -= num
21 return self._value
22
23 @property
24 def value(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected