Mercurial > pub > ImplabNet
view Implab.Test/PromiseHelper.cs @ 86:b33832ab0262 v2
ServiceLocator: added a cleanup callback to the service registration method
author | cin |
---|---|
date | Mon, 06 Oct 2014 03:41:17 +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; }); } } }