3 writes to _lazyCompletionTaskSource
System.Threading.Tasks.Dataflow (3)
Blocks\WriteOnceBlock.cs (3)
83
_lazyCompletionTaskSource
= new TaskCompletionSource<VoidResult>(TaskCreationOptions.RunContinuationsAsynchronously);
193
if (Interlocked.CompareExchange(ref
_lazyCompletionTaskSource
, Common.CompletedVoidResultTaskCompletionSource, null) != null)
502
Interlocked.CompareExchange(ref
_lazyCompletionTaskSource
, new TaskCompletionSource<VoidResult>(TaskCreationOptions.RunContinuationsAsynchronously), null);
7 references to _lazyCompletionTaskSource
System.Threading.Tasks.Dataflow (7)
Blocks\WriteOnceBlock.cs (7)
92
_lazyCompletionTaskSource
.TrySetCanceled(dataflowBlockOptions.CancellationToken);
98
dataflowBlockOptions.CancellationToken,
_lazyCompletionTaskSource
.Task, static (state, _) => ((WriteOnceBlock<T>)state!).Complete(), this);
173
Debug.Assert(
_lazyCompletionTaskSource
== null || !
_lazyCompletionTaskSource
.Task.IsCompleted, "The task completion source must not be completed. This must be the only thread that ever completes the block.");
195
_lazyCompletionTaskSource
.TrySetResult(default(VoidResult));
500
if (
_lazyCompletionTaskSource
== null)
505
return
_lazyCompletionTaskSource
;