[erlang-questions] Re: callback module without behavior definition?
Wed Apr 6 20:03:40 CEST 2011
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
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?
On Wed, Apr 6, 2011 at 12:35 PM, David Mercer <dmercer@REDACTED> wrote:
> On Wednesday, April 06, 2011, Attila Rajmund Nohl wrote:
> > 2011/4/6, Daniel Goertzen <daniel.goertzen@REDACTED>:
> > > One thing that has bothered me about implementing gen_servers is that
> > I have
> > > to create empty stubs for the callbacks that I don't need. Today I
> > made a
> > > gen_server that only needs init/1, so instead of creating all those
> > stubs I
> > > just commented out the behavior definition "-behavior(gen_server)."
> > Then why bother with gen_server, why not use erlang:spawn_link or
> > proc_lib:spawn_link (if you want fancy crash reports)?
> Isn't a gen_server the OTP thing to do? Hook it into a supervisor and all
> that, too...
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions