Пример #1
0
        public void OnCompleted(Action continuation)
        {
            var promise = _future.GetPromise();

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

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