view Implab.Test/PromiseHelper.cs @ 74:c4140283575c v2

minor fixes
author cin
date Mon, 08 Sep 2014 17:40:46 +0400
parents 3b8393be3441
children 91362ffbecf8
line wrap: on
line source

using Implab.Parallels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

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