It is possible to provide a specialized version of AtomicDict that always holds integer values. In this case it is possible to implement most use-cases of collections.Counter with additional thread-safety guarantees.
It should also be possible to provide better performance, maybe by using AtomicIntCounters as values?
It doesn't have to provide performance benefits in the first iteration if it already provides more safety guarantees.
It is possible to provide a specialized version of
AtomicDictthat always holds integer values. In this case it is possible to implement most use-cases ofcollections.Counterwith additional thread-safety guarantees.It should also be possible to provide better performance, maybe by using
AtomicIntCounters as values?It doesn't have to provide performance benefits in the first iteration if it already provides more safety guarantees.