[erlang-questions] gproc for environment data (Re: Regarding `application:get_env` / `application:set_env` race conditions)

Ulf Wiger ulf.wiger@REDACTED
Tue Apr 26 20:39:45 CEST 2011

I considered it, but decided to hold off on that for now. It's all too tempting to start by creating a big hole that lets you plug in anything, but that can always be done later too. :)

Ulf W

On 26 Apr 2011, at 20:32, Ciprian Dorin Craciun wrote:

>    Though: it would be nice to be able to specify a generic function
> to be used to fetch the value, like:
> ~~~~
>    SomeFun = fun (Key) ->
>        case <<some_expression>> of
>            <<some_pattern>> -> {ok, some_value};
>            <<some_other_pattern>> -> undefined
>        end
>    end,
>    gproc:get_env (l, some_app, some_key, [app_env, SomeFun,
> {transform, {erlang, list_to_atom}, os_env}]).

Ulf Wiger, CTO, Erlang Solutions, Ltd.

More information about the erlang-questions mailing list