<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Personally, I like to use plain_fsm, so I don't have to worry about writing that boring code to handle system messages.</div><div><br></div><div><a href="https://github.com/esl/plain_fsm">https://github.com/esl/plain_fsm</a></div><div><br></div><div>It doesn't force you to use the parse transformery and pseudo functions; you can e.g. use </div><div><br></div><div><a href="https://github.com/esl/plain_fsm/blob/master/doc/plain_fsm.md#handle_system_msg-4">https://github.com/esl/plain_fsm/blob/master/doc/plain_fsm.md#handle_system_msg-4</a></div><div><br></div><div>and simply have plain_fsm as a library for those system message handlers.</div><div><br></div><div>BR,</div><div>Ulf W</div><br><div><div>On 21 Apr 2011, at 16:32, Håkan Mattsson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I tend to use proc_lib (spawn_link, start_link, init_ack) and sys<br>(handle_system_msg) a lot. They gives you almost all the bells and<br>whistles that gen_server has, but it enables you to have the same<br>simple code structure that you have in your very pedagogic code<br>snippet below.</blockquote></div><br><div>
<div>Ulf Wiger, CTO, Erlang Solutions, Ltd.</div><div><a href="http://erlang-solutions.com">http://erlang-solutions.com</a></div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></body></html>