11.3.25 bb_update/3

Synopsis

bb_update(:Key, -OldTerm, +NewTerm)

If a term is currently stored under Key and unifies with OldTerm, then the term is replaced by a copy of NewTerm. Otherwise, bb_update/3 silently fails. This predicate provides an atomic swap operation.

Arguments

:Key

bbkey

OldTerm

term

NewTerm

term

Description

Any uninstantiated variables in the Term will be replaced by brand new, unattributed variables (see ref-sem-sec).

Exceptions

instantiation_error

Key is not instantiated

type_error

Key is not an atom or a small integer.

See Also

ref-mdb-bbd.


Send feedback on this subject.