Erlang Thermal update mechanism

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.