Mercurial > pub > ImplabNet
view Implab.Test/PromiseHelper.cs @ 75:4439140706d0 v2
major refactoring, added tasks support
| author | cin |
|---|---|
| date | Wed, 10 Sep 2014 11:17:37 +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; }); } } }
