aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src/gen_server.xml
diff options
context:
space:
mode:
authorAnton N Ryabkov <[email protected]>2017-04-12 15:06:39 +0700
committerAnton N Ryabkov <[email protected]>2017-05-02 08:21:13 +0700
commit42faed747858483506c12e722573e48d0f5f7996 (patch)
tree8e439ddf9178ce50fb6914130ffe54c5cec3fc60 /lib/stdlib/doc/src/gen_server.xml
parentffa80a41370025ed2fb95967e731f13cc7e45e4f (diff)
downloadotp-42faed747858483506c12e722573e48d0f5f7996.tar.gz
otp-42faed747858483506c12e722573e48d0f5f7996.tar.bz2
otp-42faed747858483506c12e722573e48d0f5f7996.zip
Added support of auto_hibernate_timeout option for gen_server, gen_fsm, gen_event process's.
There is realized gen_server, gen_fsm, gen_event automatic hibernation functionality. Added unit tests for realized functionality. Added documentation for auto_hibernate_timeout option.
Diffstat (limited to 'lib/stdlib/doc/src/gen_server.xml')
-rw-r--r--lib/stdlib/doc/src/gen_server.xml12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/stdlib/doc/src/gen_server.xml b/lib/stdlib/doc/src/gen_server.xml
index 0bcbbc2805..f6053d501f 100644
--- a/lib/stdlib/doc/src/gen_server.xml
+++ b/lib/stdlib/doc/src/gen_server.xml
@@ -199,7 +199,7 @@ gen_server:abcast -----> Module:handle_cast/2
<type>
<v>Module = atom()</v>
<v>Options = [Option]</v>
- <v>&nbsp;Option = {debug,Dbgs}</v>
+ <v>&nbsp;Option = {debug,Dbgs} | {auto_hibernate_timeout,AutoHibernateTimeout}</v>
<v>&nbsp;&nbsp;Dbgs = [Dbg]</v>
<v>&nbsp;&nbsp;&nbsp;Dbg = trace | log | statistics</v>
<v>&nbsp;&nbsp;&nbsp;&nbsp;| {log_to_file,FileName} | {install,{Func,FuncState}}</v>
@@ -334,7 +334,7 @@ gen_server:abcast -----> Module:handle_cast/2
<v>Module = atom()</v>
<v>Args = term()</v>
<v>Options = [Option]</v>
- <v>&nbsp;Option = {debug,Dbgs} | {timeout,Time} | {spawn_opt,SOpts}</v>
+ <v>&nbsp;Option = {debug,Dbgs} | {timeout,Time} | {auto_hibernate_timeout,AutoHibernateTimeout} | {spawn_opt,SOpts}</v>
<v>&nbsp;&nbsp;Dbgs = [Dbg]</v>
<v>&nbsp;&nbsp;&nbsp;Dbg = trace | log | statistics | {log_to_file,FileName} | {install,{Func,FuncState}}</v>
<v>&nbsp;&nbsp;SOpts = [term()]</v>
@@ -364,7 +364,7 @@ gen_server:abcast -----> Module:handle_cast/2
<v>Module = atom()</v>
<v>Args = term()</v>
<v>Options = [Option]</v>
- <v>&nbsp;Option = {debug,Dbgs} | {timeout,Time} | {spawn_opt,SOpts}</v>
+ <v>&nbsp;Option = {debug,Dbgs} | {timeout,Time} | {auto_hibernate_timeout,AutoHibernateTimeout} | {spawn_opt,SOpts}</v>
<v>&nbsp;&nbsp;Dbgs = [Dbg]</v>
<v>&nbsp;&nbsp;&nbsp;Dbg = trace | log | statistics | {log_to_file,FileName} | {install,{Func,FuncState}}</v>
<v>&nbsp;&nbsp;SOpts = [term()]</v>
@@ -417,6 +417,12 @@ gen_server:abcast -----> Module:handle_cast/2
returns <c>{error,timeout}</c>.</p>
</item>
<item>
+ <p>If option <c>{auto_hibernate_timeout,AutoHibernateTimeout}</c> is present, the <c>gen_server</c>
+ process wait any message <c>AutoHibernateTimeout</c> milliseconds and
+ in case of no message was received, process goes into hibernation automatically
+ (by calling <seealso marker="proc_lib#hibernate/3"><c>proc_lib:hibernate/3</c></seealso>).</p>
+ </item>
+ <item>
<p>If option <c>{debug,Dbgs}</c> is present,
the corresponding <c>sys</c> function is called for each
item in <c>Dbgs</c>; see