1 write to Registrations
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
1208
Registrations
= registrations;
15 references to Registrations
System.Private.CoreLib (15)
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenRegistration.cs (10)
34
if (_node is CancellationTokenSource.CallbackNode node && !node.
Registrations
.Unregister(_id, node))
49
CancellationTokenSource source = node.
Registrations
.Source;
52
node.
Registrations
.ThreadIDExecutingCallbacks != Environment.CurrentManagedThreadId) // The executing thread ID is not this thread's ID.
56
node.
Registrations
.WaitForCallbackToComplete(id);
71
return _node is CancellationTokenSource.CallbackNode node && !node.
Registrations
.Unregister(_id, node) ?
79
CancellationTokenSource source = node.
Registrations
.Source;
82
node.
Registrations
.ThreadIDExecutingCallbacks != Environment.CurrentManagedThreadId) // The executing thread ID is not this thread's ID.
86
return node.
Registrations
.WaitForCallbackToCompleteAsync(id);
102
new CancellationToken(node.
Registrations
.Source) : // avoid CTS.Token, which throws after disposal
110
_node is CancellationTokenSource.CallbackNode node && node.
Registrations
.Unregister(_id, node);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (5)
774
Debug.Assert(node.
Registrations
.Source == this);
807
n.
Registrations
.ThreadIDExecutingCallbacks = Environment.CurrentManagedThreadId;
1060
Debug.Assert(node.
Registrations
== this, "Expected node to come from this registrations instance");
1217
Invoke(Callback, CallbackState,
Registrations
.Source);
1225
Invoke(node.Callback, node.CallbackState, node.
Registrations
.Source);