Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Merge changes from TFS - #1591

Merged
jkotas merged 1 commit into
dotnet:nmirrorfrom
dotnet-bot:from-tfs
Jul 28, 2016
Merged

jkotas merged 1 commit into
dotnet:nmirrorfrom
dotnet-bot:from-tfs

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

No description provided.

…Lib.

This change is motivated by the Reflection API work. A number of reflection type need to be migrated to System.Private.CoreLib, including Assembly. Assembly has a dependency on Stream, so it will need to be moved as well. Stream, in turn, has a dependency on Task, and Task ends up requiring most of what is currently in System.Private.Threading.

As such, this change pulls almost all of the types in System.Private.Threading into System.Private.CoreLib. Future changes will move Stream and Assembly.

A few things to note about this change:

1.) System.Private.Threading depended on the Random type, which is found in CoreFX. I've simply copied the implementation of Random from the CoreFX repo. We'll need to decide if we want to retire that copy in favor of this one, or simply live with two copies.

2.) Type forwards have been put in place for all public types involved in the move for the sake of those assemblies that depend on System.Private.Threading directly instead of the System.Threading or System.Threading.Tasks contracts.

3.) To avoid pulling all of the ETW tracing from CoreFX into System.Private.CoreLib, I've defined a set of callbacks for ETW events in System.Private.CoreLib. The callbacks are implemented in System.Private.Threading, along with the existing EventSource implementations. The callbacks are hooked up using the EagerOrderedStaticConstructor attribute, and ILC has been updated to force the hookup code to be kept alive.

4.) A handful of public types are left in System.Private.Threading. Since they don't have to be moved and we need to keep System.Private.Threading around for the EventSources anyway, I'm planning on leaving them where they are.

5.) I've deleted a couple of internal types that weren't being used, as well as some string resources. These were dead code even before this migration.

These changes have passed precheckin.bat on x86 ret.

[tfs-changeset: 1619702]
@jkotas
jkotas merged commit 654077d into dotnet:nmirror Jul 28, 2016
@dotnet-bot
dotnet-bot deleted the from-tfs branch July 28, 2016 17:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants