Current and Old Code
The code of a module can exists in, variants in a system: current code and old code. When a-module is loaded to the system for the first time, the code of the module becomes ' current ' and the global EX Port table is updated with references to all functions exported from the module.
If and a new instance of the module is loaded (perhaps because of the correction of a error) and then the code of the Previ ous instance becomes ' old ', and all export entries referring to the previous instance is removed. After then the new instance is loaded as if it were loaded for the first time, as described above, and becomes ' current '.
Both old and current code for a module is valid, and may even be evaluated concurrently. The difference is, exported functions in old code was unavailable. Hence there is no-it-make-global call-to-exported function in old code, but old code may still be evaluated Becau SE of processes lingering in it.
If a third instance of the module is loaded, the code server would remove (purge) The old code and any processes lingering In it'll be terminated. Then the third instance becomes "current" and the previously current code becomes ' old '.
For more information about the old and the current code, and how to make a process switch from the old to the current code, refer to E Rlang Reference Manual.
Erlang Thermal update mechanism