[erlang-questions] gen_statem, postpone and repeat_state

Fred Hebert mononcqc@REDACTED
Thu Apr 19 13:23:55 CEST 2018


On 04/19, Frans Schneider wrote:
>Hi list,
>
>I was assuming that with a repeat_state in gen_statem, all postponed 
>events would be re-evaluated. The docs give no explicit details about 
>this as far as I know. So, was my assumption wrong or would it be 
>logical for postponed events to be re-evaluated in this situation?
>

Postponed events are only replayed once the state has changed. repeating 
a state is not very different than something like

    handle_event(..., ..., current_state, Data) ->
        {next_state, current_state, Data}.

As such I think it's the right thing that postponed events are not 
replayed.

Regards,
Fred.



More information about the erlang-questions mailing list