示例#1
0
        public void SetRet(Result result)
        {
            if (awaiter != null)
            {
                awaiter.SetResult(result);
                awaiter.IsCompleted = true;

                Action _Continuation = awaiter.Continuation;
                awaiter = null;
                _Continuation?.Invoke();
            }
        }
示例#2
0
        public void SetRet(ReturnResult result)
        {
            if (awaiter != null)
            {
                awaiter.SetResult(result);
                awaiter.IsCompleted = true;

                Action _Continuation = awaiter.Continuation;
                awaiter = null;

                if (_Continuation != null)
                {
                    _Continuation();
                }
            }
        }