I do want to hook it into a supervisor.  If I use a proc_lib process, it looks like I would have to implement a message loop and some other callbacks.<div><br></div><div>I guess my original question is more about what behavior statements actually do.  Do they just add compile-time "type" checking, or do they have some real runtime impact?</div>
<div><br></div><div>Dan.<br><div><br></div><div><br><br><div class="gmail_quote">On Wed, Apr 6, 2011 at 12:35 PM, David Mercer <span dir="ltr"><<a href="mailto:dmercer@gmail.com">dmercer@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Wednesday, April 06, 2011, Attila Rajmund Nohl wrote:<br>
<br>
> 2011/4/6, Daniel Goertzen <<a href="mailto:daniel.goertzen@gmail.com">daniel.goertzen@gmail.com</a>>:<br>
> > One thing that has bothered me about implementing gen_servers is that<br>
> I have<br>
> > to create empty stubs for the callbacks that I don't need.  Today I<br>
> made a<br>
> > gen_server that only needs init/1, so instead of creating all those<br>
> stubs I<br>
> > just commented out the behavior definition "-behavior(gen_server)."<br>
><br>
> Then why bother with gen_server, why not use erlang:spawn_link or<br>
> proc_lib:spawn_link (if you want fancy crash reports)?<br>
<br>
</div>Isn't a gen_server the OTP thing to do?  Hook it into a supervisor and all<br>
that, too...<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br><br clear="all"><br><br><br>
</div></div>