[erlang-questions] gen_statem confusion

Alex S. alex0player@REDACTED
Thu Jan 19 09:59:37 CET 2017


> 19 янв. 2017 г., в 6:01, Vans S <vans_163@REDACTED> написал(а):
> 
> 
> 
> This wording is really confusing:
> 
>> instead the the time-out event is enqueued to ensure 
>> that it gets processed before any not yet received 
>> external event
> Because when I tried a test case
> 
> init() ->
>  send(self(), hi),
>  {_,_,_,0}.  %0 timeout basically
> 
> The 0 timeout procced before the 'hi' message.
> Using 1 as the timeout, 'hi' message procs first.
> 
> But it says not yet received external event.  To me send() seems like 
> an external event. Hence confusing.
Well, it was sent, but not yet received by the gen_statem’s main loop.


More information about the erlang-questions mailing list