[erlang-questions] hot code reloading

t x txrev319@REDACTED
Sun Mar 2 00:36:20 CET 2014


Hi,

  I'm reading Chapter 8 of Programming Erlang, and I want to verify if
my mental model of erlang code reloading is correct. My erlang is a
bit weak, so I'm going to use C++ notation.

https://gist.github.com/anonymous/9299344

  Is the above correct with respect to *compile* and *lookup* ?

  It seems to me the defining characteristics of erlang's code hot reloading is:

  * we have an "old" and a "new"
  * the new becomes the old, and we kill all processes spawned by the old

  Suppose we have

  * module foo, module bar;
  * foo:hi(), refers to bar:hello();

  * we recompile bar; now, all foo's references to bar, uses the
_latest_ bar, not the bar that existed when foo was compiled

If I have misunderstood anything, please correct me.

Thanks!



More information about the erlang-questions mailing list