Mutex.Lock (Mutex v1.3.2)

This module defines a struct containing the key(s) locked with all the locking functions in Mutex.

Link to this section Summary

Types

t()

The struct containing the key(s) locked during a lock operation. :type specifies wether there is one or more keys.

Functions

Returns the metadata associated with the lock. The metadata is given to the mutex on initialization

Link to this section Types

Specs

t() :: %Mutex.Lock{
  key: nil | Mutex.key(),
  keys: nil | [Mutex.key()],
  meta: any(),
  type: :single | :multi
}

The struct containing the key(s) locked during a lock operation. :type specifies wether there is one or more keys.

Link to this section Functions

Specs

get_meta(lock :: t()) :: any()

Returns the metadata associated with the lock. The metadata is given to the mutex on initialization:

Mutex.start_link(name: MyMutex, meta: metadata)