alt.hn

5/9/2026 at 8:26:57 AM

Counting Fast in Erlang with:counters and:atomics

https://andrealeopardi.com/posts/erlang-counters-and-atomics/

by malmz

5/11/2026 at 8:37:43 PM

hm, last i checked counters were fully implemented as atomics, it seems now theres another internal bif for "write concurrency", is this new or was it always like this and did i just miss it?

by dnautics

5/11/2026 at 9:10:48 PM

Already existed when it was first merged: https://github.com/erlang/otp/commit/fefb5d039e87ff7137e78b3...

Atomics were introduced a while before `counters`, maybe you remember a custom implementation on top of that?

by filmor

5/12/2026 at 3:35:42 AM

nah, I probably didn't quite read the code correctly. Thanks for the link.

by dnautics

5/11/2026 at 11:08:55 PM

What we really need is an atomic_term :)

by schultzer