Skip to content

Instantly share code, notes, and snippets.

@mager
Created March 17, 2017 16:56
Show Gist options
  • Save mager/997456e1349db9c6dc6a78b05198f7a0 to your computer and use it in GitHub Desktop.
Save mager/997456e1349db9c6dc6a78b05198f7a0 to your computer and use it in GitHub Desktop.
Simple consul_mut_ex example using do...while block
iex> ConsulMutEx.lock(“test_key”, max_retries: 0) do
...> :acquired
...> else
...> :failed_to_acquire
...> end
:acquired
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment