##// END OF EJS Templates
Working on regular DFA
Working on regular DFA

File last commit:

r149:eb793fbbe4ea v2
r171:0f70905b4652 ref20160224
Show More
ActionChainTask.cs
25 lines | 776 B | text/x-csharp | CSharpLexer
using System;
namespace Implab {
public class ActionChainTask : ActionChainTaskBase, IDeferred {
readonly Func<IPromise> m_task;
public ActionChainTask(Func<IPromise> task, Func<Exception, IPromise> error, Func<Exception, IPromise> cancel, bool autoCancellable) : base(error,cancel, autoCancellable) {
m_task = task;
}
public void Resolve() {
if (m_task != null && LockCancelation()) {
try {
var p = m_task();
p.On(SetResult, HandleErrorInternal, SetCancelled);
CancellationRequested(p.Cancel);
} catch(Exception err) {
HandleErrorInternal(err);
}
}
}
}
}