Mercurial > pub > ImplabNet
view Implab.Test/PromiseHelper.cs @ 89:ce0171cacec4 v2
improved performance of a chained map operation
author | cin |
---|---|
date | Wed, 08 Oct 2014 02:19:45 +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; }); } } }