##// END OF EJS Templates
refactoring, code cleanup
refactoring, code cleanup

File last commit:

r149:eb793fbbe4ea v2
r158:130781364799 v2
Show More
PromiseHelper.cs
14 lines | 403 B | text/x-csharp | CSharpLexer
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((ct) => {
ct.CancellationRequested(ct.CancelOperation);
Thread.Sleep(timeout);
return retVal;
});
}
}
}