[erlang-questions] MyModule:start_link/? vs supervisor:start_link/3

Charles Shuller <>
Tue Sep 13 23:06:26 CEST 2016


I've developed a marked preference for starting the primary supervisor in
my application callback modules as:

    supervisor:start_link({local, my_module}, my_module, InitArgs)

But I've noticed that most code I see seems to prefer:


where my_module:start_link always calls supervisor:start_link call.

Is there any advantage to specifying a custom start_link in the supervisor
callback module??   It seems to me that the "owner" of the supervisor is
the application, and therefore the configuration (i.e. parameter values)
should be performed by the application callback, and not the supervisor


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160913/9de263b8/attachment.html>

More information about the erlang-questions mailing list