From b54d82fea10c24359d2a315668b6176fc47963b7 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Fri, 22 Apr 2016 15:18:07 +0200 Subject: Promote gen_statem over gen_fsm --- system/doc/design_principles/des_princ.xml | 6 ++++-- system/doc/design_principles/fsm.xml | 12 +++++++++++- system/doc/design_principles/release_handling.xml | 4 ++-- system/doc/design_principles/statem.xml | 9 +++++++++ system/doc/design_principles/sup_princ.xml | 2 +- 5 files changed, 27 insertions(+), 6 deletions(-) (limited to 'system/doc') diff --git a/system/doc/design_principles/des_princ.xml b/system/doc/design_principles/des_princ.xml index 0e087cf843..8ab8661c2d 100644 --- a/system/doc/design_principles/des_princ.xml +++ b/system/doc/design_principles/des_princ.xml @@ -4,7 +4,7 @@
- 19972013 + 19972016 Ericsson AB. All Rights Reserved. @@ -226,7 +226,9 @@ free(Ch, {Alloc, Free} = Channels) ->

gen_server

For implementing the server of a client-server relation

gen_fsm

-

For implementing finite-state machines

+

For implementing finite-state machines (Old)

+

gen_statem

+

For implementing state machines (New)

gen_event

For implementing event handling functionality

supervisor

diff --git a/system/doc/design_principles/fsm.xml b/system/doc/design_principles/fsm.xml index f58b50cbff..3468f93ae0 100644 --- a/system/doc/design_principles/fsm.xml +++ b/system/doc/design_principles/fsm.xml @@ -4,7 +4,7 @@
- 19972013 + 19972016 Ericsson AB. All Rights Reserved. @@ -30,6 +30,16 @@ fsm.xml
+ +

+ There is a new behaviour + gen_statem + that is intended to replace gen_fsm for new code. + It has the same features and add some really useful. + This module will not be removed for the foreseeable future + to keep old state machine implementations running. +

+

This section is to be read with the gen_fsm(3) manual page in STDLIB, where all interface functions and callback functions are described in detail.

diff --git a/system/doc/design_principles/release_handling.xml b/system/doc/design_principles/release_handling.xml index 20ddc3dbf5..4f71ad4437 100644 --- a/system/doc/design_principles/release_handling.xml +++ b/system/doc/design_principles/release_handling.xml @@ -4,7 +4,7 @@
- 20032014 + 20032016 Ericsson AB. All Rights Reserved. @@ -249,7 +249,7 @@

If Modules=dynamic, which is the case for event managers, the event manager process informs the release handler about the list of currently installed event handlers - (gen_fsm), and it is checked if the module name is in + (gen_event), and it is checked if the module name is in this list instead.

The release handler suspends, asks for code change, and resumes processes by calling the functions diff --git a/system/doc/design_principles/statem.xml b/system/doc/design_principles/statem.xml index 27b9b7c761..a921a40243 100644 --- a/system/doc/design_principles/statem.xml +++ b/system/doc/design_principles/statem.xml @@ -36,6 +36,15 @@ manual page in STDLIB, where all interface functions and callback functions are described in detail.

+

+ This is a new behaviour in OTP-19.0. + It has been thoroughly reviewed, is stable enough + to be used by at least two heavy OTP applications, and is here to stay. + But depending on user feedback, we do not expect + but might find it necessary to make minor + not backwards compatible changes into OTP-20.0, + so its state can be designated as "not quite experimental"... +

diff --git a/system/doc/design_principles/sup_princ.xml b/system/doc/design_principles/sup_princ.xml index a6b7dbb68d..749c9f69f2 100644 --- a/system/doc/design_principles/sup_princ.xml +++ b/system/doc/design_principles/sup_princ.xml @@ -402,8 +402,8 @@ supervisor:delete_child(Sup, Id) restarts.

-
+ Simplified one_for_one Supervisors

A supervisor with restart strategy simple_one_for_one is a simplified one_for_one supervisor, where all child -- cgit v1.2.3