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.