view Implab.Test/PromiseHelper.cs @ 127:d86da8d2d4c3 v2

fixed AsyncQueue iterator
author cin
date Tue, 27 Jan 2015 18:18:29 +0300
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;
            });
        }
    }
}