[erlang-questions] Difference between gen_server and gen_fsm
Thu Oct 11 08:39:18 CEST 2007
I agree - gen_fsm can lead to cleaner code, and this might be
significant esp in state machines with many states.
2007/10/11, Jack Orenstein <>:
> I'm going through the OTP design principles book and think that I am
> missing the point of gen_fsm. The difference between gen_fsm and
> gen_server seems to be a small syntactic one. Instead of handle_call
> handling each kind of request, there is a function per FSM state. Not
> having used gen_fsm yet, it seems that gen_fsm would lead to cleaner
> code. But the two behaviors are so similar, I feel that I am either
> missing the point of gen_fsm, or completely missing some aspect of
> its behavior. Can someone please explain the distinction?
> Jack Orenstein
> erlang-questions mailing list
More information about the erlang-questions