[erlang-questions] Proposal for new state machine engine: gen_statem

Raimo Niskanen raimo+erlang-questions@REDACTED
Thu Feb 18 15:21:08 CET 2016


On Wed, Feb 10, 2016 at 01:56:48PM +0100, Raimo Niskanen wrote:
> Hi all!
> 
> I have created a pull request for a new state machine engine in the gen_*
> framework.  There is a heated discussion right now on GitHUB:
> 
>     https://github.com/erlang/otp/pull/960
> 
> Please contribute with an opinion.

I just pushed a new version with the following major changes directly
caused by the pull request discussion:

* Change state function return format to tagged tuples
  {stop,...} and {next_event,...}.
* An option 'callback_mode' : 'state_functions' |' handle_event_function'
  that selects between atom only states and any term states.
* Rename the state operation 'insert_event' to 'next_event'.
* Rename the state option 'retry' to 'postpone'.

Updated documentation at:
  http://erlang.org/~raimo/doc-7.2/lib/stdlib-2.7/doc/html/gen_statem.html

Updated OTP 1.2 .beam files at:
  https://github.com/erlang/otp/pull/erlang.org/%7Eraimo/OTP-18.2-stdlib-ebin-gen_statem.tgz
keep the original around.

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list