1 type derived from AsyncOperation
System.Threading.Channels (1)
System\Threading\Channels\AsyncOperation.cs (1)
452
internal sealed class VoidAsyncOperationWithData<TData> :
AsyncOperation
<VoidResult>
18 instantiations of AsyncOperation
System.Threading.Channels (18)
System\Threading\Channels\BoundedChannel.cs (6)
69
_readerSingleton = new
AsyncOperation
<T>(parent._runContinuationsAsynchronously, pooled: true);
70
_waiterSingleton = new
AsyncOperation
<bool>(parent._runContinuationsAsynchronously, pooled: true);
181
var reader = new
AsyncOperation
<T>(parent._runContinuationsAsynchronously | cancellationToken.CanBeCanceled, cancellationToken);
235
var waiter = new
AsyncOperation
<bool>(parent._runContinuationsAsynchronously | cancellationToken.CanBeCanceled, cancellationToken);
308
_waiterSingleton = new
AsyncOperation
<bool>(runContinuationsAsynchronously: true, pooled: true);
518
var waiter = new
AsyncOperation
<bool>(runContinuationsAsynchronously: true, cancellationToken);
System\Threading\Channels\SingleConsumerUnboundedChannel.cs (4)
62
_readerSingleton = new
AsyncOperation
<T>(parent._runContinuationsAsynchronously, pooled: true);
63
_waiterSingleton = new
AsyncOperation
<bool>(parent._runContinuationsAsynchronously, pooled: true);
114
newBlockedReader = new
AsyncOperation
<T>(_parent._runContinuationsAsynchronously, cancellationToken);
186
newWaitingReader = new
AsyncOperation
<bool>(_parent._runContinuationsAsynchronously, cancellationToken);
System\Threading\Channels\UnboundedChannel.cs (4)
51
_readerSingleton = new
AsyncOperation
<T>(parent._runContinuationsAsynchronously, pooled: true);
52
_waiterSingleton = new
AsyncOperation
<bool>(parent._runContinuationsAsynchronously, pooled: true);
107
var reader = new
AsyncOperation
<T>(parent._runContinuationsAsynchronously, cancellationToken);
184
var waiter = new
AsyncOperation
<bool>(parent._runContinuationsAsynchronously, cancellationToken);
System\Threading\Channels\UnboundedPriorityChannel.cs (4)
57
_readerSingleton = new
AsyncOperation
<T>(parent._runContinuationsAsynchronously, pooled: true);
58
_waiterSingleton = new
AsyncOperation
<bool>(parent._runContinuationsAsynchronously, pooled: true);
107
var reader = new
AsyncOperation
<T>(parent._runContinuationsAsynchronously, cancellationToken);
188
var waiter = new
AsyncOperation
<bool>(parent._runContinuationsAsynchronously, cancellationToken);
71 references to AsyncOperation
System.Threading.Channels (71)
System\Threading\Channels\AsyncOperation.cs (7)
94
var
thisRef = (
AsyncOperation
<TResult>)s!;
101
public
AsyncOperation
<TResult>? Next { get; set; }
405
sc.Post(static s => ((
AsyncOperation
<TResult>)s!).SetCompletionAndInvokeContinuation(), this);
418
Task.Factory.StartNew(static s => ((
AsyncOperation
<TResult>)s!).SetCompletionAndInvokeContinuation(), this,
441
var
thisRef = (
AsyncOperation
<TResult>)s!;
System\Threading\Channels\BoundedChannel.cs (20)
27
private readonly Deque<
AsyncOperation
<T>> _blockedReaders = new Deque<
AsyncOperation
<T>>();
31
private
AsyncOperation
<bool>? _waitingReadersTail;
33
private
AsyncOperation
<bool>? _waitingWritersTail;
63
private readonly
AsyncOperation
<T> _readerSingleton;
64
private readonly
AsyncOperation
<bool> _waiterSingleton;
165
AsyncOperation
<T> singleton = _readerSingleton;
181
var
reader = new AsyncOperation<T>(parent._runContinuationsAsynchronously | cancellationToken.CanBeCanceled, cancellationToken);
219
AsyncOperation
<bool> singleton = _waiterSingleton;
235
var
waiter = new AsyncOperation<bool>(parent._runContinuationsAsynchronously | cancellationToken.CanBeCanceled, cancellationToken);
302
private readonly
AsyncOperation
<bool> _waiterSingleton;
345
ChannelUtilities.FailOperations<
AsyncOperation
<T>, T>(parent._blockedReaders, ChannelUtilities.CreateInvalidCompletionException(error));
356
AsyncOperation
<T>? blockedReader = null;
357
AsyncOperation
<bool>? waitingReadersTail = null;
386
AsyncOperation
<T> r = parent._blockedReaders.DequeueHead();
509
AsyncOperation
<bool> singleton = _waiterSingleton;
518
var
waiter = new AsyncOperation<bool>(runContinuationsAsynchronously: true, cancellationToken);
531
AsyncOperation
<T>? blockedReader = null;
532
AsyncOperation
<bool>? waitingReadersTail = null;
561
AsyncOperation
<T> r = parent._blockedReaders.DequeueHead();
System\Threading\Channels\ChannelUtilities.cs (9)
69
internal static void QueueWaiter(ref
AsyncOperation
<bool>? tail,
AsyncOperation
<bool> waiter)
71
AsyncOperation
<bool>? c = tail;
84
internal static void WakeUpWaiters(ref
AsyncOperation
<bool>? listTail, bool result, Exception? error = null)
86
AsyncOperation
<bool>? tail = listTail;
91
AsyncOperation
<bool> head = tail.Next!;
92
AsyncOperation
<bool> c = head;
95
AsyncOperation
<bool> next = c.Next!;
110
internal static void FailOperations<T, TInner>(Deque<T> operations, Exception error) where T :
AsyncOperation
<TInner>
System\Threading\Channels\SingleConsumerUnboundedChannel.cs (11)
34
/// <summary>An <see cref="
AsyncOperation
{T}"/> if there's a blocked reader.</summary>
35
private
AsyncOperation
<T>? _blockedReader;
38
private
AsyncOperation
<bool>? _waitingReader;
56
private readonly
AsyncOperation
<T> _readerSingleton;
57
private readonly
AsyncOperation
<bool> _waiterSingleton;
84
AsyncOperation
<T>? oldBlockedReader, newBlockedReader;
154
AsyncOperation
<bool>? oldWaitingReader = null, newWaitingReader;
211
AsyncOperation
<T>? blockedReader = null;
212
AsyncOperation
<bool>? waitingReader = null;
286
AsyncOperation
<T>? blockedReader = null;
287
AsyncOperation
<bool>? waitingReader = null;
System\Threading\Channels\UnboundedChannel.cs (12)
22
private readonly Deque<
AsyncOperation
<T>> _blockedReaders = new Deque<
AsyncOperation
<T>>();
27
private
AsyncOperation
<bool>? _waitingReadersTail;
45
private readonly
AsyncOperation
<T> _readerSingleton;
46
private readonly
AsyncOperation
<bool> _waiterSingleton;
98
AsyncOperation
<T> singleton = _readerSingleton;
107
var
reader = new AsyncOperation<T>(parent._runContinuationsAsynchronously, cancellationToken);
175
AsyncOperation
<bool> singleton = _waiterSingleton;
184
var
waiter = new AsyncOperation<bool>(parent._runContinuationsAsynchronously, cancellationToken);
234
ChannelUtilities.FailOperations<
AsyncOperation
<T>, T>(parent._blockedReaders, ChannelUtilities.CreateInvalidCompletionException(error));
246
AsyncOperation
<T>? blockedReader = null;
247
AsyncOperation
<bool>? waitingReadersTail = null;
System\Threading\Channels\UnboundedPriorityChannel.cs (12)
27
private readonly Deque<
AsyncOperation
<T>> _blockedReaders = new Deque<
AsyncOperation
<T>>();
32
private
AsyncOperation
<bool>? _waitingReadersTail;
51
private readonly
AsyncOperation
<T> _readerSingleton;
52
private readonly
AsyncOperation
<bool> _waiterSingleton;
98
AsyncOperation
<T> singleton = _readerSingleton;
107
var
reader = new AsyncOperation<T>(parent._runContinuationsAsynchronously, cancellationToken);
179
AsyncOperation
<bool> singleton = _waiterSingleton;
188
var
waiter = new AsyncOperation<bool>(parent._runContinuationsAsynchronously, cancellationToken);
239
ChannelUtilities.FailOperations<
AsyncOperation
<T>, T>(parent._blockedReaders, ChannelUtilities.CreateInvalidCompletionException(error));
251
AsyncOperation
<T>? blockedReader = null;
252
AsyncOperation
<bool>? waitingReadersTail = null;