Imported Upstream version 5.20.0.185

Former-commit-id: fcd643a64a9c5470917dbbb1be4ba228e5c14650
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-02-06 08:26:08 +00:00
parent 97f8185566
commit f737def5f5
55 changed files with 79 additions and 46 deletions

View File

@@ -1243,7 +1243,11 @@ namespace System.Threading
{
// capture the sync context
if (0 == (options & CaptureOptions.IgnoreSyncCtx))
#if MONO
syncCtxNew = ecCurrent.SynchronizationContext;
#else
syncCtxNew = (ecCurrent.SynchronizationContext == null) ? null : ecCurrent.SynchronizationContext.CreateCopy();
#endif
#if FEATURE_REMOTING
// copy over the Logical Call Context