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

File last commit:

r149:eb793fbbe4ea v2
r192:f1da3afc3521 merge release v2.1 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;
});
}
}
}