##// END OF EJS Templates
Added 'Fail' method to RunnableComponent which allows component to move from...
Added 'Fail' method to RunnableComponent which allows component to move from Running to Failed state. Added PollingComponent a timer based runnable component More tests Added FailPromise a thin class to wrap exceptions Fixed error handling in SuccessPromise classes.

File last commit:

r203:4d9830a9bbb8 v2
r203:4d9830a9bbb8 v2
Show More
PromiseHelper.cs
22 lines | 663 B | text/x-csharp | CSharpLexer
cin
refactoring
r11 using Implab.Parallels;
cin
implemeted new cancellable promises concept
r10 using System.Threading;
namespace Implab.Test {
cin
ported tests to mono
r77 static class PromiseHelper {
cin
fixed tests
r73 public static IPromise<T> Sleep<T>(int timeout, T retVal) {
cin
fixed promises cancellation
r149 return AsyncPool.Invoke((ct) => {
ct.CancellationRequested(ct.CancelOperation);
cin
implemeted new cancellable promises concept
r10 Thread.Sleep(timeout);
return retVal;
});
}
cin
Added 'Fail' method to RunnableComponent which allows component to move from...
r203
public static IPromise Sleep(int timeout) {
return AsyncPool.Invoke((ct) => {
ct.CancellationRequested(ct.CancelOperation);
Thread.Sleep(timeout);
return 0;
});
}
cin
implemeted new cancellable promises concept
r10 }
}