##// END OF EJS Templates
DFA refactoring, rx based dfa.
DFA refactoring, rx based dfa.

File last commit:

r149:eb793fbbe4ea v2
r170:181119ef3b39 ref20160224
Show More
ActionTask.cs
22 lines | 627 B | text/x-csharp | CSharpLexer
using System;
namespace Implab {
public class ActionTask : ActionTaskBase, IDeferred {
readonly Action m_task;
public ActionTask(Action task, Action<Exception> error, Action<Exception> cancel, bool autoCancellable) : base(error,cancel, autoCancellable) {
m_task = task;
}
public void Resolve() {
if (m_task != null && LockCancelation()) {
try {
m_task();
SetResult();
} catch(Exception err) {
HandleErrorInternal(err);
}
}
}
}
}