[erlang-questions] load_file() and purge()

Alex S. alex0player@REDACTED
Fri Nov 25 13:27:01 CET 2016


> 25 нояб. 2016 г., в 15:20, Salikhov Dinislam <Dinislam.Salikhov@REDACTED> написал(а):
> 
> Hi!
> 
> Let's assume there is a module forty_two.beam loaded by VM.
> Then the module is updated and hot loaded:
>    > code:load_file(forty_two).
>    {module, forty_two}
> 
> Then let's assume that there is no process using an old version of the module (for example, the module contains only pure functions).
Even pure functions are executed by the process, and the process can run out of reductions in the middle of that, and stall potentially indefinitely.
To detect old code would require not only checking execution states, but also funs (which no longer kill the process, but cease working, and that may be undesired).




More information about the erlang-questions mailing list