composablesys / collabs

Collabs library monorepo
https://collabs.readthedocs.io/
Apache License 2.0
254 stars 11 forks source link

CCounter observed-reset operation #255

Closed mweidner037 closed 1 year ago

mweidner037 commented 1 year ago

Add a reset() method to CCounter that resets the value to 0, undoing all causally-prior increments.

This is not much harder than the current state-based counter implementation, and can probably written so it has minimal perf penalty if you never call reset().

mweidner037 commented 1 year ago

Closing this until there is demonstrated interest.