Skip to content

AssemblyLoadContext unloadability documentation - #1975

Merged
sdmaclea merged 4 commits into
dotnet:masterfrom
sdmaclea:unloadability
Mar 8, 2019
Merged

sdmaclea merged 4 commits into
dotnet:masterfrom
sdmaclea:unloadability

Conversation

@sdmaclea

@sdmaclea sdmaclea commented Mar 1, 2019

Copy link
Copy Markdown
Contributor

Summary

Document AssemblyLoadContext unloadability added for .NET Core 3.0

Fixes #1717

/cc @janvorli

@sdmaclea sdmaclea added 📁 Repo - dotnet-api-docs doc-enhancement Improve the current content 🏁 Release: .NET Core 3.0 :checkered_flag: Release: .NET Core 3.0 labels Mar 1, 2019
@sdmaclea sdmaclea self-assigned this Mar 1, 2019
@sdmaclea
sdmaclea requested review from mairaw and rpetrusha March 1, 2019 01:32
@sdmaclea sdmaclea added new-content Indicates PRs that contain new articles and removed doc-enhancement Improve the current content labels Mar 1, 2019
@sdmaclea sdmaclea added this to the March 2019 milestone Mar 1, 2019

@rpetrusha rpetrusha left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for documenting these members, @sdmaclea. I've left some suggested changes.

Comment thread xml/System.Reflection/Assembly.xml Resolved
Comment thread xml/System.Reflection/Assembly.xml Resolved
Comment thread xml/System.Reflection/Assembly.xml Outdated
<summary>To be added.</summary>
<summary>Is Assembly held in a collectible AssemblyLoadContext?</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be helpful to add a remark that explains what a collectible assembly load context is.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I drafted the remarks

Comment thread xml/System.Reflection/MemberInfo.xml Resolved
Comment thread xml/System.Reflection/MemberInfo.xml Resolved
sdmaclea and others added 2 commits March 1, 2019 13:40
Update xml/System.Reflection/MemberInfo.xml
Update xml/System.Runtime.Loader/AssemblyLoadContext.xml

Co-Authored-By: sdmaclea <stmaclea@microsoft.com>

Care should be taken to avoid holding references in global data structures which may unintentionally prevent collection.

Similarly, care should also be taken to hold references when intentionally trying to prevent garbage collection.

@sdmaclea sdmaclea Mar 1, 2019 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janvorli I was tempted to add a comment here that threads running in a collectible ALC should hold a reference in the stack, but I wasn't sure what the guidance was supposed to be.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what you are trying to say. What reference they should hold in the stack?

You can take a look at my pending https://github.com/dotnet/docs/pull/10256/files, section "Troubleshoot unloadability issues" for a list of things that can hold collectible context alive.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just revised this to refer to your new doc. Thanks.

@sdmaclea
sdmaclea force-pushed the unloadability branch 2 times, most recently from cae3e67 to 46595ac Compare March 2, 2019 04:11
@rpetrusha

Copy link
Copy Markdown

Is this ready to merge, @sdmaclea?

@sdmaclea

sdmaclea commented Mar 7, 2019

Copy link
Copy Markdown
Contributor Author

I just looked at the open publish results and one of the links was broken. I just committed the fix. It should be ready to merge as long as that link is valid (it is used in 4 places).

@rpetrusha

Copy link
Copy Markdown

Thanks, @sdmaclea. I should have thought of looking at the build report!

@sdmaclea

sdmaclea commented Mar 7, 2019

Copy link
Copy Markdown
Contributor Author

The build finished. The broken link warning is gone, but openpublish.build doesn't seem to have published the files. For instance https://review.docs.microsoft.com/en-us/system.runtime.loader.assemblyloadcontext?branch=pr-en-us-1975&view=netcore-3.0 gives a 404.

@rpetrusha

Copy link
Copy Markdown

@sdmaclea
sdmaclea merged commit 954b302 into dotnet:master Mar 8, 2019
@sdmaclea
sdmaclea deleted the unloadability branch March 8, 2019 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏁 Release: .NET Core 3.0 :checkered_flag: Release: .NET Core 3.0 new-content Indicates PRs that contain new articles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants