##// END OF EJS Templates
Слияние
Слияние

File last commit:

r203:4d9830a9bbb8 v2
r223:27ea7f07e2e4 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;
});
}
}
}