[erlang-questions] Two questions on dynamic code loading example in Joe's book

Maxim Treskin <>
Sat Jun 27 18:03:36 CEST 2009

When you change a code after running a:start/1 there is a process instance
which executes previous code and no more. If you want update process code
while it running make loop/1 function to be exported by module a and call it
with fully qualified name:

loop(Tag) ->
   Val = b:x(),
   io:format("Vsn1 (~p) b:x() = ~p~n",[Tag, Val]),

Maxim Treskin

More information about the erlang-questions mailing list