diff options
Diffstat (limited to 'erts/doc/src/persistent_term.xml')
-rw-r--r-- | erts/doc/src/persistent_term.xml | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/erts/doc/src/persistent_term.xml b/erts/doc/src/persistent_term.xml index 29a6c67051..672b00a83a 100644 --- a/erts/doc/src/persistent_term.xml +++ b/erts/doc/src/persistent_term.xml @@ -29,7 +29,7 @@ <rev></rev> <file>persistent_term.xml</file> </header> - <module>persistent_term</module> + <module since="OTP 21.2">persistent_term</module> <modulesummary>Persistent terms.</modulesummary> <description> <p>This module is similar to <seealso @@ -121,19 +121,6 @@ </section> <section> - <title>Warning For Many Persistent Terms</title> - <p>The runtime system will send a warning report to the - error logger if more than 20000 persistent terms have been - created. It will look like this:</p> - -<pre> -More than 20000 persistent terms have been created. -It is recommended to avoid creating an excessive number of -persistent terms, as creation and deletion of persistent terms -will be slower as the number of persistent terms increases.</pre> - </section> - - <section> <title>Best Practices for Using Persistent Terms</title> <p>It is recommended to use keys like <c>?MODULE</c> or @@ -213,7 +200,7 @@ will be slower as the number of persistent terms increases.</pre> <funcs> <func> - <name name="erase" arity="1"/> + <name name="erase" arity="1" since="OTP 21.2"/> <fsummary>Erase the name for a persistent term.</fsummary> <desc> <p>Erase the name for the persistent term with key @@ -229,7 +216,7 @@ will be slower as the number of persistent terms increases.</pre> </func> <func> - <name name="get" arity="0"/> + <name name="get" arity="0" since="OTP 21.2"/> <fsummary>Get all persistent terms.</fsummary> <desc> <p>Retrieve the keys and values for all persistent terms. @@ -239,7 +226,7 @@ will be slower as the number of persistent terms increases.</pre> </func> <func> - <name name="get" arity="1"/> + <name name="get" arity="1" since="OTP 21.2"/> <fsummary>Get the value for a persistent term.</fsummary> <desc> <p>Retrieve the value for the persistent term associated with @@ -256,7 +243,23 @@ will be slower as the number of persistent terms increases.</pre> </func> <func> - <name name="info" arity="0"/> + <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> <p>Return information about persistent terms in a map. The map @@ -272,7 +275,7 @@ will be slower as the number of persistent terms increases.</pre> </func> <func> - <name name="put" arity="2"/> + <name name="put" arity="2" since="OTP 21.2"/> <fsummary>Store a term.</fsummary> <desc> <p>Store the value <c><anno>Value</anno></c> as a persistent term and |