Mercurial > pub > ImplabNet
view Implab.Test/PromiseHelper.cs @ 135:656815cb7147 v2
Fixed chaining of promises with 'Then' method
author | cin |
---|---|
date | Fri, 13 Feb 2015 02:08:01 +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; }); } } }