Skip to content

Commit 118d0a6

Browse files
authored
Update AppDomain notes for .NET Core and .NET 5 (#12071)
1 parent f9ad06a commit 118d0a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml/System/AppDomain.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Application domains, which are represented by <xref:System.AppDomain> objects, h
9797
- If an assembly is loaded into the default application domain, it cannot be unloaded from memory while the process is running. However, if you open a second application domain to load and execute the assembly, the assembly is unloaded when that application domain is unloaded. Use this technique to minimize the working set of long-running processes that occasionally use large DLLs.
9898

9999
> [!NOTE]
100-
> On .NET Core, the <xref:System.AppDomain> implementation is limited by design and does not provide isolation, unloading, or security boundaries. For .NET Core, there is exactly one <xref:System.AppDomain>. Isolation and unloading are provided through <xref:System.Runtime.Loader.AssemblyLoadContext>. Security boundaries should be provided by process boundaries and appropriate remoting techniques.
100+
> On .NET Core and .NET 5+, the <xref:System.AppDomain> implementation is limited by design and does not provide isolation, unloading, or security boundaries. These versions have exactly one <xref:System.AppDomain>. Isolation and unloading are provided through <xref:System.Runtime.Loader.AssemblyLoadContext>. Security boundaries should be provided by process boundaries and appropriate remoting techniques.
101101

102102
Multiple application domains can run in a single process; however, there is not a one-to-one correlation between application domains and threads. Several threads can belong to a single application domain, and while a given thread is not confined to a single application domain, at any given time, a thread executes in a single application domain.
103103

@@ -7306,7 +7306,7 @@ The friendly name of the default application domain is the file name of the proc
73067306
Beginning with the .NET Framework version 2.0, this event is raised in each application domain that registers an event handler.
73077307

73087308
> [!NOTE]
7309-
> In .NET Framework, the total execution time of all <xref:System.AppDomain.ProcessExit> event handlers is limited, just as the total execution time of all finalizers is limited at process shutdown. The default is two seconds. An unmanaged host can change this execution time by calling the [ICLRPolicyManager::SetTimeout](/dotnet/framework/unmanaged-api/hosting/iclrpolicymanager-settimeout-method) method with the [OPR_ProcessExit](/dotnet/framework/unmanaged-api/hosting/eclroperation-enumeration) enumeration value. This time limit does not exist in .NET Core.
7309+
> In .NET Framework, the total execution time of all <xref:System.AppDomain.ProcessExit> event handlers is limited, just as the total execution time of all finalizers is limited at process shutdown. The default is two seconds. An unmanaged host can change this execution time by calling the [ICLRPolicyManager::SetTimeout](/dotnet/framework/unmanaged-api/hosting/iclrpolicymanager-settimeout-method) method with the [OPR_ProcessExit](/dotnet/framework/unmanaged-api/hosting/eclroperation-enumeration) enumeration value. This time limit does not exist in .NET Core and .NET 5+.
73107310

73117311
In the .NET Framework versions 1.0 and 1.1, this event is raised only in the default application domain, and only if an event handler is registered in the default application domain.
73127312

0 commit comments

Comments
 (0)