view Implab.Test/PromiseHelper.cs @ 113:468d156e434e v2-1

working on linked list
author cin
date Wed, 10 Dec 2014 01:29:53 +0100
parents 91362ffbecf8
children eb793fbbe4ea
line wrap: on
line source

using Implab.Parallels;
using System.Threading;

namespace Implab.Test {
    static class PromiseHelper {
        public static IPromise<T> Sleep<T>(int timeout, T retVal) {
            return AsyncPool.Invoke(() => {
                Thread.Sleep(timeout);
                return retVal;
            });
        }
    }
}