##// END OF EJS Templates
fixed: the error handler should not handle handlers errors
fixed: the error handler should not handle handlers errors

File last commit:

r149:eb793fbbe4ea v2
r197:86187b01c4e0 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;
});
}
}
}