[erlang-questions] Hot code loading and OTP
Joe Armstrong
erlang@REDACTED
Fri Sep 21 22:06:48 CEST 2007
On 9/21/07, David Terrell <dbt@REDACTED> wrote:
> On Fri, Sep 21, 2007 at 08:19:56AM -0700, Jay Nelson wrote:
> > A friend who hadn't seen erlang before just finished reading Joe's
> > book. We were discussing hot code loading and he didn't realize that
> > prefixing a function call with a Module: caused a load of code from
> > disk. I attempted to search through the book and find the
> > description, but was unable to find an explicit reference. Was this
> > accidentally left out?
It doesn't load from disk - it calls the latest version of the module.
This *is* described in detail in appendix E.4
/Joe
>
> calling Module:Func only loads the module from disk if the module
> was not loaded before. It does not reload the module.
>
> The only time there's a difference in behavior is the case of
> localfunc(Args) vs ?MODULE:localfunc(Args). The former will
> stay in the same version of the module; the latter will break
> out of the stale version and into the new version if the module
> has been reloaded.
>
> --
> David Terrell
> dbt@REDACTED
> ((meatspace)) http://meat.net/
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list