ExLock (ex_lock v0.1.1) View Source

Link to this section Summary

Link to this section Functions

Link to this function

acquire(key, opts \\ [])

View Source

Specs

acquire(key :: String.t(), opts :: Keyword.t()) ::
  {:ok, ExLock.Holder.t()} | {:error, ExLock.Error.t()}
Link to this function

acquire!(key, opts \\ [])

View Source

Specs

acquire!(key :: String.t(), opts :: Keyword.t()) :: ExLock.Holder.t()
Link to this function

execute(key, opts, function)

View Source

Specs

execute(key :: String.t(), function :: any(), opts :: Keyword.t()) ::
  {:ok, any()} | {:error, ExLock.Error.t()}
Link to this function

execute!(key, function, opts \\ [])

View Source

Specs

execute!(key :: String.t(), function :: any(), opts :: Keyword.t()) :: any()
Link to this function

release(lock_holder, key)

View Source

Specs

release(lock_holder :: ExLock.Holder.t(), key :: String.t()) :: nil