[erlang-questions] Is a supervisor necessary here/when should I use one?

zxq9 zxq9@REDACTED
Sun Jul 23 13:58:17 CEST 2017

On 2017年07月21日 金曜日 15:35:48 code wiget wrote:
> Conceptually, I am new to this. Is there any place for a supervisor here? My goals are to run the startup script that just sets the function in the environment and to optimize my function speed. If there is no place for a supervisor, how would I run my Erlang startup program without having the console freak out at me?

Functions don't have supervisors, processes do.

Think about processes as workers in your information factory.

Think about functions as things your workers do -- and ANY worker may perform ANY function (potentially).

With this mental image in mind answer the question:
Which process is calling this function?

The answer will tell you the context of the execution. The context of execution will answer the rest of your questions as a matter of course (and if not, you will automatically solicit many experienced opinions here if you answer the question above publicly in this thread -- and especially if you continue to brainstorm by typing things out here).

More information about the erlang-questions mailing list