[erlang-questions] update_counter on steroids

Antonio SJ Musumeci trapexit@REDACTED
Mon May 12 21:28:15 CEST 2014


https://github.com/trapexit/otp/tree/feature/ets_lookup_and_delete
https://github.com/trapexit/otp/tree/feature/ets_pop_first_last
*https://github.com/trapexit/otp/tree/feature/ets_swap
<https://github.com/trapexit/otp/tree/feature/ets_swap>*

Similar to the previously mentioned...

A while back I worked on these but forgot to try and push them upstream. I
thought I had done an a select and delete which returned the values removed
but I can't seem to find it.


On Mon, May 12, 2014 at 2:12 PM, Anthony Ramine <n.oxyde@REDACTED> wrote:

> Well, it sounds like we are all implementing a statsd-like system of some
> sort. :)
>
> --
> Anthony Ramine
>
> Le 12 mai 2014 à 19:55, Pablo Polvorin <pablo.polvorin@REDACTED> a
> écrit :
>
> > I do.   On one system I've a table  holding many different counters,
> that are periodically flushed to an external system. Without the atomic
> take_all_objects/1, I'm retrieving all and then iterating and  subtracting
> to all keys the values that I've just read..
> > btw,   ets:update_counter/4 with default value will simplify it a lot
> too, thanks!
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140512/56b3bad0/attachment.htm>


More information about the erlang-questions mailing list