Exemplo n.º 1
0
        public Future <TResult> Run <TResult>(Func <Future <TResult> > func)
        {
            var promise = new RunFuturePromise <TResult>(func);

            Schedule(state => ((RunFuturePromise <TResult>)state).Run(), promise);

            return(promise.Future);
        }
Exemplo n.º 2
0
        public Future Run(Func <Future> func)
        {
            var promise = new RunFuturePromise(func);

            Schedule(state => ((RunFuturePromise)state).Run(), promise);

            return(promise.Future);
        }