From 0ab6149067a82d89e584f862604c1c63578fd5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 13 Feb 2019 08:29:51 +0100 Subject: Add persistent_term:get(Key, DefaultValue) https://bugs.erlang.org/browse/ERL-843 --- erts/doc/src/persistent_term.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/persistent_term.xml b/erts/doc/src/persistent_term.xml index 1eda7f8d76..9d3c9afd80 100644 --- a/erts/doc/src/persistent_term.xml +++ b/erts/doc/src/persistent_term.xml @@ -255,6 +255,22 @@ will be slower as the number of persistent terms increases. + + + Get the value for a persistent term. + +

Retrieve the value for the persistent term associated with + the key Key. The lookup will be made in + constant time and the value will not be copied to the heap + of the calling process.

+

This function returns Default if no + term has been stored with the key Key.

+

If the calling process holds on to the value of the + persistent term and the persistent term is deleted in the future, + the term will be copied to the process.

+
+
+ Get information about persistent terms. -- cgit v1.2.3