[erlang-questions] The gen server simplified (how it works)
Ulf Wiger
ulf.wiger@REDACTED
Thu Apr 21 17:06:03 CEST 2011
Personally, I like to use plain_fsm, so I don't have to worry about writing that boring code to handle system messages.
https://github.com/esl/plain_fsm
It doesn't force you to use the parse transformery and pseudo functions; you can e.g. use
https://github.com/esl/plain_fsm/blob/master/doc/plain_fsm.md#handle_system_msg-4
and simply have plain_fsm as a library for those system message handlers.
BR,
Ulf W
On 21 Apr 2011, at 16:32, Håkan Mattsson wrote:
> I tend to use proc_lib (spawn_link, start_link, init_ack) and sys
> (handle_system_msg) a lot. They gives you almost all the bells and
> whistles that gen_server has, but it enables you to have the same
> simple code structure that you have in your very pedagogic code
> snippet below.
Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110421/ff9a7296/attachment.htm>
More information about the erlang-questions
mailing list