# `Lockstep.PersistentTerm`
[🔗](https://github.com/b-erdem/lockstep/blob/v0.1.0/lib/lockstep/persistent_term.ex#L1)

Controller-aware wrappers around `:persistent_term`.

`:persistent_term` is global-process-table key/value storage,
optimised for read-mostly workloads. Reads are lock-free; writes
trigger a global GC. Operations are individually atomic but
read-then-conditional-write composes racefully.

## Per-node isolation

Under a Lockstep iteration with cluster nodes, keys are namespaced
by the calling process's node. `:persistent_term.put(:foo, 1)` on
node `:n1` and `:persistent_term.put(:foo, 2)` on node `:n2` are
stored under distinct internal keys; reads from each node see only
their own value. This mirrors how each real BEAM node has its own
process-local persistent_term store.

Falls through to the underlying `:persistent_term` call when no
Lockstep controller is in process dictionary.

# `erase`

Sync point + `:persistent_term.erase/1`.

# `get`

Sync point + `:persistent_term.get/1`.

# `get`

Sync point + `:persistent_term.get/2` (with default).

# `info`

Sync point + `:persistent_term.info/0`.

# `put`

Sync point + `:persistent_term.put/2`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
