News for hackers. Stuff that matters.
Re:Reducing the maximum latency of a bound buffer in Erlang by qaq on Monday December 19, 2016 @10:34PM (#13217247)
While if you play a bit with Elixir it will likely grow on you, there is nothing preventing you from writing it as something like

element = :ets.lookup_element(buffer.ets, pull_index, 2)

pi = rem(pull_index + 1, buffer.max_size)

buffer = %Buffer.Ets{buffer | size: buffer.size - 1, pull_index: pi}

{:ok, {element, buffer}}

There are no comments on this comment yet.