You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function used in the code is :erlang.phash2 (notice the trailing 2 in the name), which returns the result in the range of 0..(n-1) (see here), so +1 is needed in this case.
elixir-in-action/code_samples/ch09/proper_registry_supervision/lib/todo/database.ex
Line 21 in c6c0813
:erlang.phash() already puts the number between 1..n, no need to add one.
The text was updated successfully, but these errors were encountered: