[erlang-questions] Use of application environment
Tue Dec 2 05:11:20 CET 2008
On Tue, Nov 25, 2008 at 4:57 AM, Mazen Harake <
> Mazen Harake wrote:
> > Personally I think in terms of isolation and how long the worker is
> > going to live.
> > If the worker is short lived and doesn't depend on that the app env is
> > the same in several places... then I tend to use application:get_env.
> > If the worker is a more heavy worker and depends on more rigid values
> > then I tend to copy the configuration to the state so that I can
> > control when a good time to update it is..
> > Magically updating all the workers is not always a good thing... and
> > yes, applicationg:get_env is the same as using global variables.
I was holding off from replying and hoping to receive more opinions and
thank everyone at once, but I guess no more are forthcoming. Many thanks to
you and wde for your input.
> > /Mazen
> > Edwin Fine wrote:
> >> Hi all,
> >> Is it considered bad practice to use application environment
> >> variables (i.e. application:get_env/2,3) in workers, as opposed to
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions