ProcessStore (process_store v0.2.0) View Source
A Facility to store and retrieve a data from the process dictionary.
Link to this section Summary
Link to this section Types
Specs
data() :: any()
Specs
Link to this section Functions
Specs
Retrieve the value of key
from the Process
or from the $callers
dictionaries.
Returns the first found occurrence.
Examples
iex> ProcessStore.fetch(:my_key)
"anything"
iex> ProcessStore.fetch(:non_existing_key)
nil
Specs
Store the passed value
in the dictionary of the current Process
using the passed key
.
The return value of this function is the value that was previously stored under the same key
,
or nil
in case no value was stored before.
Examples
iex> ProcessStore.store(:my_key, anything")
nil
iex> ProcessStore.store(:my_key, "somethingelse")
"anything"