Fix Thread-related breaking changes
authorStephen Toub <stoub@microsoft.com>
Wed, 27 Feb 2019 19:51:50 +0000 (14:51 -0500)
committerStephen Toub <stoub@microsoft.com>
Wed, 27 Feb 2019 19:51:50 +0000 (14:51 -0500)
commitaf1cbb0bf0f0b66f5808f09eed63a08185d993df
tree4b47f2c46e0231699513f2bb0b7fd19fa45ed232
parentd6e2e93e54d5d80b4da67377530a468d7be4d655
Fix Thread-related breaking changes

- Thread.ExecutionContext needs to return ExecutionContext.Capture() to public callers.
- Fix restoring of culture to be inside of the ExecutionContext callback where applicable

Commit migrated from https://github.com/dotnet/coreclr/commit/3042c90aa8ed4bfe56b6f6bc21c4bd93545ee239
src/coreclr/src/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs
src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPool.cs