##// END OF EJS Templates
fixed regression: race condition in Promise...
fixed regression: race condition in Promise DFA refactoring

File last commit:

r149:eb793fbbe4ea v2
r160:5802131432e4 v2
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);
}
}
}
}
}