57 references to ChannelUtilities
System.Threading.Channels (57)
System\Threading\Channels\BoundedChannel.cs (20)
159
return
ChannelUtilities
.GetInvalidCompletionValueTask<T>(parent._doneWriting);
208
return parent._doneWriting !=
ChannelUtilities
.s_doneWritingSentinel ?
222
ChannelUtilities
.QueueWaiter(ref parent._waitingReadersTail, singleton);
236
ChannelUtilities
.QueueWaiter(ref _parent._waitingReadersTail, waiter);
256
ChannelUtilities
.Complete(parent._completion, parent._doneWriting);
285
ChannelUtilities
.WakeUpWaiters(ref parent._waitingWritersTail, result: true);
326
parent._doneWriting = error ??
ChannelUtilities
.s_doneWritingSentinel;
337
ChannelUtilities
.Complete(parent._completion, error);
345
ChannelUtilities
.FailOperations<AsyncOperation<T>, T>(parent._blockedReaders,
ChannelUtilities
.CreateInvalidCompletionException(error));
346
ChannelUtilities
.FailOperations<VoidAsyncOperationWithData<T>, VoidResult>(parent._blockedWriters,
ChannelUtilities
.CreateInvalidCompletionException(error));
347
ChannelUtilities
.WakeUpWaiters(ref parent._waitingReadersTail, result: false, error: error);
348
ChannelUtilities
.WakeUpWaiters(ref parent._waitingWritersTail, result: false, error: error);
470
ChannelUtilities
.WakeUpWaiters(ref waitingReadersTail, result: true);
491
return parent._doneWriting !=
ChannelUtilities
.s_doneWritingSentinel ?
512
ChannelUtilities
.QueueWaiter(ref parent._waitingWritersTail, singleton);
519
ChannelUtilities
.QueueWaiter(ref parent._waitingWritersTail, waiter);
546
return new ValueTask(Task.FromException(
ChannelUtilities
.CreateInvalidCompletionException(parent._doneWriting)));
659
ChannelUtilities
.WakeUpWaiters(ref waitingReadersTail, result: true);
System\Threading\Channels\ChannelReader.cs (1)
21
public virtual Task Completion =>
ChannelUtilities
.s_neverCompletingTask;
System\Threading\Channels\ChannelWriter.cs (2)
64
throw
ChannelUtilities
.CreateInvalidCompletionException();
74
throw
ChannelUtilities
.CreateInvalidCompletionException();
System\Threading\Channels\SingleConsumerUnboundedChannel.cs (8)
96
return
ChannelUtilities
.GetInvalidCompletionValueTask<T>(parent._doneWriting);
130
ChannelUtilities
.Complete(parent._completion, parent._doneWriting);
166
return parent._doneWriting !=
ChannelUtilities
.s_doneWritingSentinel ?
225
parent._doneWriting = error ??
ChannelUtilities
.s_doneWritingSentinel;
251
ChannelUtilities
.Complete(parent._completion, error);
259
error =
ChannelUtilities
.CreateInvalidCompletionException(error);
346
doneWriting !=
ChannelUtilities
.s_doneWritingSentinel ? new ValueTask<bool>(Task.FromException<bool>(doneWriting)) :
355
new ValueTask(Task.FromException(
ChannelUtilities
.CreateInvalidCompletionException(_parent._doneWriting)));
System\Threading\Channels\UnboundedChannel.cs (13)
92
return
ChannelUtilities
.GetInvalidCompletionValueTask<T>(parent._doneWriting);
136
ChannelUtilities
.Complete(parent._completion, parent._doneWriting);
167
return parent._doneWriting !=
ChannelUtilities
.s_doneWritingSentinel ?
178
ChannelUtilities
.QueueWaiter(ref parent._waitingReadersTail, singleton);
185
ChannelUtilities
.QueueWaiter(ref parent._waitingReadersTail, waiter);
217
parent._doneWriting = error ??
ChannelUtilities
.s_doneWritingSentinel;
228
ChannelUtilities
.Complete(parent._completion, error);
234
ChannelUtilities
.FailOperations<AsyncOperation<T>, T>(parent._blockedReaders,
ChannelUtilities
.CreateInvalidCompletionException(error));
235
ChannelUtilities
.WakeUpWaiters(ref parent._waitingReadersTail, result: false, error: error);
295
ChannelUtilities
.WakeUpWaiters(ref waitingReadersTail, result: true);
307
doneWriting !=
ChannelUtilities
.s_doneWritingSentinel ? new ValueTask<bool>(Task.FromException<bool>(doneWriting)) :
314
new ValueTask(Task.FromException(
ChannelUtilities
.CreateInvalidCompletionException(_parent._doneWriting)));
System\Threading\Channels\UnboundedPriorityChannel.cs (13)
92
return
ChannelUtilities
.GetInvalidCompletionValueTask<T>(parent._doneWriting);
146
ChannelUtilities
.Complete(parent._completion, parent._doneWriting);
171
return parent._doneWriting !=
ChannelUtilities
.s_doneWritingSentinel ?
182
ChannelUtilities
.QueueWaiter(ref parent._waitingReadersTail, singleton);
189
ChannelUtilities
.QueueWaiter(ref parent._waitingReadersTail, waiter);
222
parent._doneWriting = error ??
ChannelUtilities
.s_doneWritingSentinel;
233
ChannelUtilities
.Complete(parent._completion, error);
239
ChannelUtilities
.FailOperations<AsyncOperation<T>, T>(parent._blockedReaders,
ChannelUtilities
.CreateInvalidCompletionException(error));
240
ChannelUtilities
.WakeUpWaiters(ref parent._waitingReadersTail, result: false, error: error);
300
ChannelUtilities
.WakeUpWaiters(ref waitingReadersTail, result: true);
312
doneWriting !=
ChannelUtilities
.s_doneWritingSentinel ? ValueTask.FromException<bool>(doneWriting) :
319
ValueTask.FromException(
ChannelUtilities
.CreateInvalidCompletionException(_parent._doneWriting));