[erlang-questions] obsolete comment in mnesia?

Ulf Wiger ulf@REDACTED
Fri Dec 23 19:57:43 CET 2011


Ah, the call to application:load(mnesia) which came later…

Still, it won't deadlock, since application:start(mnesia) will always result in the application being loaded first.

BR,
Ulf W

On 23 Dec 2011, at 19:50, Ulf Wiger wrote:

> 
> I found this in mnesia_schema.erl during some of my Christmas code browsing:
> 
> read_nodes() ->
>    %% Ensure that we access the intended Mnesia
>    %% directory. This function may not be called
>    %% during startup since it will cause the
>    %% application_controller to get into deadlock
>    case mnesia_lib:ensure_loaded(?APPLICATION) of
> 	ok ->
>>   end.
> 
> 
> As far as I can tell, there is absolutely no risk of deadlock, but I recall a time, a looong time ago, when application:loaded_applications() was actually implemented as a gen_server:call(), and calling it during application start would result in a deadlock. If memory serves, this was corrected sometime around 1996-97...
> 
> Is there something else I'm missing, or would it be ok to remove this comment?
> 
> BR,
> Ulf W
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list