예제 #1
0
            //****************************************

            public void Attach(AsyncCounterDecrement decrement)
            {
                var Task = new ValueTask <bool>(decrement, decrement.Version);

                _Awaiter = Task.ConfigureAwait(false).GetAwaiter();

                if (_Awaiter.IsCompleted)
                {
                    OnContinuePeekDecrement();
                }
                else
                {
                    _Awaiter.OnCompleted(_ContinuePeekDecrement);
                }
            }
예제 #2
0
 public void OnCompleted(Action continuation) => _taskAwaiter.OnCompleted(WrapContinuation(continuation));
예제 #3
0
 void INotifyCompletion.OnCompleted(Action continuation) => _cfgAwaiter.OnCompleted(continuation);