[erlang-questions] Unloading all modules from ERL session

Steve Davis <>
Sat Jun 15 02:32:40 CEST 2013


Hi Rob,

Good point and awesomely true, and your advice provides invaluable insight 
into the caution needed when releasing new code to long-running systems in 
prod (and the need for code change callback implementations). 

However, I've found that during development I rarely need that level of 
control, so make:all([load]) is more than enough for most purposes in dev 
that I have faced. 

"as simple as possible, but no simpler"

I guess the trick is to decide what is simple enough for the purpose.

/s

On Friday, June 14, 2013 6:11:40 AM UTC-5, Roberto Aloi wrote:
>
> In Erlang, two and only two versions of the same module can coexist in the 
> run time system (an old version and a new version). Processes running the 
> old version of the code will keep running that version (even if you load a 
> new version of the module) until they make a fully qualified call to the 
> module itself (I.e. M:F(A)). If you add a third version of the code in the 
> system (e.g. you load a module twice) the "very old" version gets purged 
> and those processes executing the obsolete version get killed. You can also 
> use code:purge and code:soft_purge to "force" this behaviour. Look at the 
> "code" module for more options.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130614/fde78686/attachment.html>


More information about the erlang-questions mailing list