dynamic code replacement

Torbjorn Tornkvist tobbe@REDACTED
Fri May 14 08:06:25 CEST 1999


> I was wondering if there are currently any know problems or 
> issues or gotchas with dynamic code replacement under Erlang. 

No...

Well, in the case where you are running a server. Make sure that
you make a module prefixed recursive call to the top loop.
Example:

loop(Data) ->
   receive
      X ->
         NewData = do_stuff(Data,X),
         ?MODULE:loop(NewData)
   end.

You also have to export (in this case) the loop/1 function.

/Tobbe








More information about the erlang-questions mailing list