. NET application domain (appdomain) is not reliable, Microsoft's error.

Source: Internet
Author: User
Author: failing ProgramMember-eight gods

Application domains do not always cause application isolation.

1 unreliable CLR synchronization mechanism methodimploptions. Synchronized
Currently, we all know that synchronization in writing threadsCodeDo not lock type objects and string constants.
2. Application domain: [loaderoptimizationattribute: loaderoptimization. multidomain]
This property is applied to the process's entry point method (void main ),
CLR supports this mechanism (shared column set: stored al-by-bleed, to save memory), you can point references in different AppDomains to the same CLR object in memory.

The result is that the Code in both appdomain domains can be locked on this object, leading to a deadlock,Application domains will not have application isolation effectAnd You Cannot uninstall the appdomain.
These objects can be class objects (typeof (myclass), strings ("ABC"), and the principles are described.

...

Such a bug may still exist in future CLR versions. Compatibility should be considered. If it is fixed, the cost will be quite high.

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.