[erlang-questions] obsolete comment in mnesia?

Ulf Wiger ulf@REDACTED
Fri Dec 23 19:50:18 CET 2011

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 ->

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?

Ulf W

More information about the erlang-questions mailing list