view Implab.Test/PromiseHelper.cs @ 90:efcb076407a7 v2

code cleanup
author cin
date Sun, 12 Oct 2014 16:50:34 +0400
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;
            });
        }
    }
}