##// END OF EJS Templates
Trace logical operations in the correct channel
Trace logical operations in the correct channel

File last commit:

r196:40d7fed4a09e default
r218:babe55c34931 v2
Show More
ActionTaskT.cs
22 lines | 648 B | text/x-csharp | CSharpLexer
cin
RC: cancellation support for promises + tests
r145 using System;
namespace Implab {
public class ActionTask<T> : ActionTaskBase, IDeferred<T> {
readonly Action<T> m_task;
cin
fixed promises cancellation
r149 public ActionTask(Action<T> task, Action<Exception> error, Action<Exception> cancel, bool autoCancellable) : base(error,cancel, autoCancellable) {
cin
RC: cancellation support for promises + tests
r145 m_task = task;
}
public void Resolve(T value) {
if (m_task != null && LockCancelation()) {
try {
m_task(value);
SetResult();
} catch(Exception err) {
cin
fixed promise chaining behavior, the error handler doesn't handle result or cancellation handlers exceptions these exceptions are propagated to the next handlers.
r196 SetErrorInternal(err);
cin
RC: cancellation support for promises + tests
r145 }
}
}
}
}