Mercurial > pub > ImplabNet
view Implab.Test/PromiseHelper.cs @ 11:6ec82bf68c8e promises
refactoring
author | cin |
---|---|
date | Tue, 05 Nov 2013 01:09:58 +0400 |
parents | aa33d0bb8c0c |
children | 3b8393be3441 |
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 Promise<T> Sleep<T>(int timeout, T retVal) { return AsyncPool.Invoke(() => { Thread.Sleep(timeout); return retVal; }); } } }