##// END OF EJS Templates
Merge
Merge

File last commit:

r249:d82909310094 v3
r283:d1498b67e01a merge default
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;
});
}
}
}