locker
locker copied to clipboard
Atomic distributed "check and set" for short-lived keys
Add define directive, which works with rebar3. Fixes #12.
Rellying on os:timestamp can produce crashes: ```elixir 11:53:04.269 [error] GenServer :locker terminating ** (FunctionClauseError) no function clause matching in :lists.seq/2 (stdlib) lists.erl:243: :lists.seq(1505728386, 1505728384) (locker) /Users/druss/dev//deps/locker/src/locker.erl:564: :locker.handle_info/2 (stdlib) gen_server.erl:616: :gen_server.try_dispatch/4...
As type of `locker_db` is `set` so for every unique key there is just one unique value, so I wonder what is the purpose of passing `Value` as second parameter...
I wonder how this project compares with Raft consensus. It looks like they have a lot in common, doesn't it?
I'd like to try this out and have been reading the code but wonder if there are a few bits missing. First is test_server.hrl line 3 in test/locker_SUITE.erl. Also the...