After checking out Gen_Fsm and Gen_Server documents, I 开发者_开发问答found that, more or less, they act as similar behavior. In my opinion, if there is one loop function for sending broadcast or list
I have a MAIN process that spawn an implementa开发者_Python百科tion of a gen_fsm behavior, but this MAIN process is not an implementation of supervisor behavior, its just another module.
I start gen_fsm: start_link() -> gen_fsm:start_link({global, ?MODULE}, [], []). How can i get it\'s P开发者_JS百科ID?
I\'m currently in a project making a gameserver. Every player is supposed have an own process with gen_fsm behavior. To start gen_fsm with start/3 we need a unique atom, currently we use make_ref() an
I noticed that messages sent to the pid of a gen_fsm process are matched in the state callbacks as events.Is this just accidental or can I rely on this feature?
I\'m looking for an example of a simple FSM implemented in Erlang using the gen_fsm from O开发者_如何学编程TP.I found this tutorial really helpful -
Normally if I\'d like to have an Erlang process timeout I would use the following construct: receive Msg -> ok; %% handle message