コード例 #1
0
ファイル: FutureAwaiter.cs プロジェクト: JeffCyr/SeerDotNet
        void IStateMachineBoxAwareAwaiter.UnsafeOnCompleted(IStateMachineBox box)
        {
            var promise = _future.GetPromise();

            if (promise != null)
            {
                promise.AddContinuation(box);
                return;
            }

            // If promise is null, it means the future was created from a result,
            // invoke the continuation immediately

            if (_scheduler != null)
            {
                box.SetScheduler(_scheduler);
                box.Invoke();
                return;
            }

            box.MoveNext();
        }
コード例 #2
0
ファイル: FutureScheduler.cs プロジェクト: JeffCyr/SeerDotNet
 void IStateMachineBoxAwareAwaiter.UnsafeOnCompleted(IStateMachineBox box)
 {
     box.SetScheduler(_scheduler);
     box.Invoke();
 }