aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/persistent_term.xml
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-02-15 09:55:33 +0100
committerGitHub <[email protected]>2019-02-15 09:55:33 +0100
commit595c159823089d0186ec2617c174356d1ff2de65 (patch)
tree5c0a7ec7cf13c699b10daf284011a7a881e69eed /erts/doc/src/persistent_term.xml
parent741109889b96e92c2edc38f4068e27ac5cd53fb8 (diff)
parent0ab6149067a82d89e584f862604c1c63578fd5fa (diff)
downloadotp-595c159823089d0186ec2617c174356d1ff2de65.tar.gz
otp-595c159823089d0186ec2617c174356d1ff2de65.tar.bz2
otp-595c159823089d0186ec2617c174356d1ff2de65.zip
Merge pull request #2140 from bjorng/bjorn/erts/persistent_term-default/ERL-843/OTP-15576
Add persistent_term:get(Key, DefaultValue)
Diffstat (limited to 'erts/doc/src/persistent_term.xml')
-rw-r--r--erts/doc/src/persistent_term.xml16
1 files changed, 16 insertions, 0 deletions
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
@@ -256,6 +256,22 @@ will be slower as the number of persistent terms increases.</pre>
</func>
<func>
+ <name name="get" arity="2" since="OTP 21.3"/>
+ <fsummary>Get the value for a persistent term.</fsummary>
+ <desc>
+ <p>Retrieve the value for the persistent term associated with
+ the key <c><anno>Key</anno></c>. The lookup will be made in
+ constant time and the value will not be copied to the heap
+ of the calling process.</p>
+ <p>This function returns <c><anno>Default</anno></c> if no
+ term has been stored with the key <c><anno>Key</anno></c>.</p>
+ <p>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.</p>
+ </desc>
+ </func>
+
+ <func>
<name name="info" arity="0" since="OTP 21.2"/>
<fsummary>Get information about persistent terms.</fsummary>
<desc>