Tony Rogvall tony@REDACTED
Sun Dec 6 21:41:01 CET 2009

I am trying the on_load feature.

I did: 


In a generic server code.

Then I defined auto_start as:

%% called when module is loaded
auto_start() ->
    Result = start(),
    io:format("result = ~p\n", [Result]),

Where start/0 is the normal:

start() ->
    gen_server:start({local, ?SERVER}, ?MODULE, [], []).


Is this supposed to be working ? Why not?
Currently I get the the "auto_start" output and the the gen_server is registered.
Apart from that it is hanging.


More information about the erlang-questions mailing list