diff options
Diffstat (limited to 'lib/stdlib/doc/src/gen_statem.xml')
-rw-r--r-- | lib/stdlib/doc/src/gen_statem.xml | 98 |
1 files changed, 57 insertions, 41 deletions
diff --git a/lib/stdlib/doc/src/gen_statem.xml b/lib/stdlib/doc/src/gen_statem.xml index d678d0436b..d4a4ba268b 100644 --- a/lib/stdlib/doc/src/gen_statem.xml +++ b/lib/stdlib/doc/src/gen_statem.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>2016</year><year>2018</year> + <year>2016</year><year>2019</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -320,12 +320,13 @@ erlang:'!' -----> Module:StateName/3 </p> <p> There is also a server start option - <seealso marker="#type-hibernate_after_opt"> + <seealso marker="#type-enter_loop_opt"> <c>{hibernate_after, Timeout}</c> </seealso> for - <seealso marker="#start/3"><c>start/3,4</c></seealso> or - <seealso marker="#start_link/3"><c>start_link/3,4</c></seealso> + <seealso marker="#start/3"><c>start/3,4</c></seealso>, + <seealso marker="#start_link/3"><c>start_link/3,4</c></seealso> or + <seealso marker="#enter_loop/4"><c>enter_loop/4,5,6</c></seealso>, that may be used to automatically hibernate the server. </p> </description> @@ -514,36 +515,6 @@ handle_event(_, _, State, Data) -> </desc> </datatype> <datatype> - <name name="debug_opt"/> - <desc> - <p> - Debug option that can be used when starting - a <c>gen_statem</c> server through, - <seealso marker="#enter_loop/4"><c>enter_loop/4-6</c></seealso>. - </p> - <p> - For every entry in <c><anno>Dbgs</anno></c>, - the corresponding function in - <seealso marker="sys"><c>sys</c></seealso> is called. - </p> - </desc> - </datatype> - <datatype> - <name name="hibernate_after_opt"/> - <desc> - <p> - hibernate_after option that can be used when starting - a <c>gen_statem</c> server through, - <seealso marker="#enter_loop/4"><c>enter_loop/4-6</c></seealso>. - </p> - <p>If option<seealso marker="#type-hibernate_after_opt"><c>{hibernate_after,HibernateAfterTimeout}</c></seealso> is present, the <c>gen_statem</c> - process awaits any message for <c>HibernateAfterTimeout</c> milliseconds and - if no message is received, the process goes into hibernation automatically - (by calling <seealso marker="proc_lib#hibernate/3"><c>proc_lib:hibernate/3</c></seealso>). - </p> - </desc> - </datatype> - <datatype> <name name="start_opt"/> <desc> <p> @@ -563,6 +534,37 @@ handle_event(_, _, State, Data) -> </desc> </datatype> <datatype> + <name name="enter_loop_opt"/> + <desc> + <p> + Options that can be used when starting + a <c>gen_statem</c> server through, + <seealso marker="#enter_loop/4"><c>enter_loop/4-6</c></seealso>. + </p> + <taglist> + <tag><c>hibernate_after</c></tag> + <item> + <p> + <c>HibernateAfterTimeout</c> + specifies that the <c>gen_statem</c> process awaits + any message for <c>HibernateAfterTimeout</c> milliseconds and + if no message is received, the process goes into hibernation + automatically (by calling + <seealso marker="proc_lib#hibernate/3"><c>proc_lib:hibernate/3</c></seealso>). + </p> + </item> + <tag><c>debug</c></tag> + <item> + <p> + For every entry in <c><anno>Dbgs</anno></c>, + the corresponding function in + <seealso marker="sys"><c>sys</c></seealso> is called. + </p> + </item> + </taglist> + </desc> + </datatype> + <datatype> <name name="from"/> <desc> <p> @@ -1701,7 +1703,11 @@ handle_event(_, _, State, Data) -> <list type="bulleted"> <item> <p> - If option <c>{timeout,Time}</c> is present in + If option + <seealso marker="#type-start_opt"> + <c>{timeout,Time}</c> + </seealso> + is present in <c><anno>Opts</anno></c>, the <c>gen_statem</c> is allowed to spend <c>Time</c> milliseconds initializing or it terminates and the start function returns @@ -1709,23 +1715,33 @@ handle_event(_, _, State, Data) -> </p> </item> <item> - <p>If option<seealso marker="#type-hibernate_after_opt"><c>{hibernate_after,HibernateAfterTimeout}</c></seealso> is present, the <c>gen_statem</c> - process awaits any message for <c>HibernateAfterTimeout</c> milliseconds and - if no message is received, the process goes into hibernation automatically - (by calling <seealso marker="proc_lib#hibernate/3"><c>proc_lib:hibernate/3</c></seealso>). + <p>If option + <seealso marker="#type-enter_loop_opt"> + <c>{hibernate_after,HibernateAfterTimeout}</c> + </seealso> + is present, the <c>gen_statem</c> + process awaits any message for <c>HibernateAfterTimeout</c> milliseconds and + if no message is received, the 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 - <seealso marker="#type-debug_opt"><c>{debug,Dbgs}</c></seealso> + <seealso marker="#type-enter_loop_opt"> + <c>{debug,Dbgs}</c> + </seealso> is present in <c><anno>Opts</anno></c>, debugging through <seealso marker="sys"><c>sys</c></seealso> is activated. </p> </item> <item> <p> - If option <c>{spawn_opt,SpawnOpts}</c> is present in + If option + <seealso marker="#type-start_opt"> + <c>{spawn_opt,SpawnOpts}</c> + </seealso> + is present in <c><anno>Opts</anno></c>, <c>SpawnOpts</c> is passed as option list to <seealso marker="erts:erlang#spawn_opt/2"><c>erlang:spawn_opt/2</c></seealso>, |