[erlang-questions] compare and set semantics using ets?

Anton Lebedevich <>
Mon Jan 14 13:44:49 CET 2013


On 01/14/2013 04:24 PM, Max Lapshin wrote:
> You want something like iptables -L which atomically tells you current
> value and reset it.

You'll need -Z flag for iptables to actually reset counters.

Here's the description of compare and set (or swap):
http://en.wikipedia.org/wiki/Compare_and_swap

Regards,
Anton Lebedevich.



More information about the erlang-questions mailing list