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