Don't run finalizers on shutdown, provide Unloading event
authordotnet-bot <dotnet-bot@microsoft.com>
Wed, 27 Jan 2016 20:48:28 +0000 (12:48 -0800)
committerdotnet-bot <dotnet-bot@microsoft.com>
Wed, 27 Jan 2016 20:48:28 +0000 (12:48 -0800)
commitcc9c314a4d34226b878463b1350a37cd24a74aa5
treeef71f2ce701173f4b25e2764c9bc362867846cbf
parent98ab26be675b96668ecf2dfe8c38f58f57454f02
Don't run finalizers on shutdown, provide Unloading event

API review: https://github.com/dotnet/corefx/issues/5205

This change implements the proposal in the API review above:
- Don't block threads for shutdown
- Don't run finalizers on shutdown (for both reachable and unreachable objects)
- Provide a public AssemblyLoadContext.Unloading event that can be handled to clean up global resources in an assembly
  - As unloading an AssemblyLoadContext is not yet implemented, the event will for the time being be raised shortly prior to shutdown

[tfs-changeset: 1569451]
src/inc/clrconfigvalues.h
src/mscorlib/model.xml
src/mscorlib/src/System/Runtime/Loader/AssemblyLoadContext.cs
src/vm/finalizerthread.cpp
tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.cs [new file with mode: 0644]
tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.csproj [new file with mode: 0644]
tests/src/GC/Scenarios/FinalizeTimeout/project.json [new file with mode: 0644]
tests/src/GC/Scenarios/FinalizeTimeout/project.lock.json [new file with mode: 0644]