aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-02-15 09:56:20 +0100
committerBjörn Gustavsson <[email protected]>2019-02-15 09:56:20 +0100
commitb4466ab778ae2278e29625d4b8220af3797fa3b6 (patch)
tree5dbb32a022aa76d71971e42c25e4173d74e1c16d /erts/doc
parent11d4a893e50b1738b01846a5e669addb3e5a4f75 (diff)
parent595c159823089d0186ec2617c174356d1ff2de65 (diff)
downloadotp-b4466ab778ae2278e29625d4b8220af3797fa3b6.tar.gz
otp-b4466ab778ae2278e29625d4b8220af3797fa3b6.tar.bz2
otp-b4466ab778ae2278e29625d4b8220af3797fa3b6.zip
Merge branch 'maint'
* maint: Add persistent_term:get(Key, DefaultValue) Make dialyzer faster for left-associative andalso/orelse expressions
Diffstat (limited to 'erts/doc')
-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>