view Implab.Test/PromiseHelper.cs @ 77:91362ffbecf8 v2

ported tests to mono
author cin
date Thu, 11 Sep 2014 10:56:14 +0400
parents 3b8393be3441
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;
            });
        }
    }
}