13 writes to _synchronizationContext
System.Private.CoreLib (13)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (6)
304
thread.
_synchronizationContext
= _synchronizationContext;
787
currentThread.
_synchronizationContext
= suspendingSyncContext;
1406
thread.
_synchronizationContext
= previousSyncCtx;
1429
thread.
_synchronizationContext
= previousSyncCtx;
1676
thread.
_synchronizationContext
= previousSyncCtx;
1742
thread.
_synchronizationContext
= previousSyncCtx;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncMethodBuilderCore.cs (1)
46
currentThread.
_synchronizationContext
= previousSyncCtx;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (4)
210
currentThread.
_synchronizationContext
= previousSyncCtx;
297
currentThread.
_synchronizationContext
= null;
351
currentThread.
_synchronizationContext
= null;
359
currentThread.
_synchronizationContext
= null;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SynchronizationContext.cs (1)
55
public static void SetSynchronizationContext(SynchronizationContext? syncContext) => Thread.CurrentThread.
_synchronizationContext
= syncContext;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (1)
944
currentThread.
_synchronizationContext
= null;
23 references to _synchronizationContext
System.Private.CoreLib (23)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (15)
263
StackState->LeafSynchronizationContext = curThread.
_synchronizationContext
;
294
_synchronizationContext = thread.
_synchronizationContext
;
301
if (_synchronizationContext != thread.
_synchronizationContext
)
785
if (suspendingSyncContext != currentThread.
_synchronizationContext
)
1196
SynchronizationContext? ctx = Thread.CurrentThreadAssumedInitialized.
_synchronizationContext
;
1218
if (continuationSyncCtx == Thread.CurrentThreadAssumedInitialized.
_synchronizationContext
)
1395
syncCtx = curThread.
_synchronizationContext
;
1404
if (previousSyncCtx != thread.
_synchronizationContext
)
1427
if (previousSyncCtx != thread.
_synchronizationContext
)
1441
SynchronizationContext? syncCtx = Thread.CurrentThreadAssumedInitialized.
_synchronizationContext
;
1463
SynchronizationContext? syncCtx = currentThread.
_synchronizationContext
;
1512
SynchronizationContext? syncCtx = currentThread.
_synchronizationContext
;
1525
if (continuationContext == currentThread.
_synchronizationContext
)
1674
if (previousSyncCtx != thread.
_synchronizationContext
)
1693
SynchronizationContext? threadSyncCtx = thread.
_synchronizationContext
;
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeAsyncTaskContinuation.cs (2)
51
SynchronizationContext? ctx = Thread.CurrentThread.
_synchronizationContext
;
74
if (canInline && continuationSyncCtx == Thread.CurrentThread.
_synchronizationContext
)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncMethodBuilderCore.cs (2)
34
SynchronizationContext? previousSyncCtx = currentThread.
_synchronizationContext
;
43
if (previousSyncCtx != currentThread.
_synchronizationContext
)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (3)
180
SynchronizationContext? previousSyncCtx = currentThread.
_synchronizationContext
;
207
if (currentThread.
_synchronizationContext
!= previousSyncCtx)
369
Debug.Assert(Thread.CurrentThread.
_synchronizationContext
== null, "ThreadPool thread not on Default SynchronizationContext.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SynchronizationContext.cs (1)
16
public static SynchronizationContext? Current => Thread.CurrentThread.
_synchronizationContext
;