[erlang-questions] Re: callback module without behavior definition?
Wed Apr 6 19:35:49 CEST 2011
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
More information about the erlang-questions