spec icon indicating copy to clipboard operation
spec copied to clipboard

Feature request: atomic counters

Open dasch opened this issue 6 months ago • 0 comments

A lot of the use cases I'm working on involve counting things; active requests, errors, values in HTTP headers. I have implemented concurrency-safe counters on top of the shared state primitives using the CAS feature, but this seems relatively inefficient and much more error prone.

It would be amazing if we could have atomic counters that could be incremented and decremented safely and simply from callbacks.

dasch avatar May 30 '25 12:05 dasch