aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/doc/src/application.xml
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2014-02-14 15:51:20 +0100
committerHenrik Nord <[email protected]>2014-02-14 15:52:49 +0100
commit6c9fa95961fcd8737fc14d75e904641c1e605440 (patch)
treefd6e994a66b1adcb59095a0c19953af47b5bebdd /lib/kernel/doc/src/application.xml
parent9c1c834d9cf5b050a6ad781f8a74cbf56e9033b2 (diff)
parent8c049f556e2656598fcf1059efc20a64927f2d66 (diff)
downloadotp-6c9fa95961fcd8737fc14d75e904641c1e605440.tar.gz
otp-6c9fa95961fcd8737fc14d75e904641c1e605440.tar.bz2
otp-6c9fa95961fcd8737fc14d75e904641c1e605440.zip
Merge branch 'josevalim/jv-persistent-set-env'
* josevalim/jv-persistent-set-env: Allow persistent option on set_env/4 and unset_env/3 OTP-11708
Diffstat (limited to 'lib/kernel/doc/src/application.xml')
-rw-r--r--lib/kernel/doc/src/application.xml17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/kernel/doc/src/application.xml b/lib/kernel/doc/src/application.xml
index 29eaf348a9..016151891c 100644
--- a/lib/kernel/doc/src/application.xml
+++ b/lib/kernel/doc/src/application.xml
@@ -239,10 +239,19 @@ Nodes = [cp1@cave, {cp2@cave, cp3@cave}]</code>
<desc>
<p>Sets the value of the configuration parameter <c><anno>Par</anno></c> for
<c><anno>Application</anno></c>.</p>
- <p><c>set_env/3</c> uses the standard <c>gen_server</c> timeout
- value (5000 ms). A <c><anno>Timeout</anno></c> argument can be provided
+ <p><c>set_env/4</c> uses the standard <c>gen_server</c> timeout
+ value (5000 ms). The <c>timeout</c> option can be provided
if another timeout value is useful, for example, in situations
where the application controller is heavily loaded.</p>
+ <p>If <c>set_env/4</c> is called before the application is loaded,
+ the application environment values specified in the <c>Application.app</c>
+ file will override the ones previously set. This is also true for application
+ reloads.</p>
+ <p>The <c>persistent</c> option can be set to <c>true</c>
+ when there is a need to guarantee parameters set with <c>set_env/4</c>
+ will not be overridden by the ones defined in the application resource
+ file on load. This means persistent values will stick after the application
+ is loaded and also on application reload.</p>
<warning>
<p>Use this function only if you know what you are doing,
that is, on your own applications. It is very application
@@ -406,9 +415,11 @@ Nodes = [cp1@cave, {cp2@cave, cp3@cave}]</code>
<p>Removes the configuration parameter <c><anno>Par</anno></c> and its value
for <c><anno>Application</anno></c>.</p>
<p><c>unset_env/2</c> uses the standard <c>gen_server</c>
- timeout value (5000 ms). A <c><anno>Timeout</anno></c> argument can be
+ timeout value (5000 ms). The <c>timeout</c> option can be
provided if another timeout value is useful, for example, in
situations where the application controller is heavily loaded.</p>
+ <p><c>unset_env/3</c> also allows the persistent option to be passed
+ (see <c>set_env/4</c> above).</p>
<warning>
<p>Use this function only if you know what you are doing,
that is, on your own applications. It is very application