##// END OF EJS Templates
More verbose output with TextFileListener
More verbose output with TextFileListener

File last commit:

r196:40d7fed4a09e default
r217:6efb77590b15 v2
Show More
FuncTask.cs
23 lines | 632 B | text/x-csharp | CSharpLexer
cin
DRAFT: refactoring
r144 using System;
using System.Threading;
namespace Implab {
public class FuncTask<T> : FuncTaskBase<T>, IDeferred {
readonly Func<T> m_task;
cin
fixed promises cancellation
r149 public FuncTask(Func<T> task, Func<Exception, T> error, Func<Exception, T> cancel, bool autoCancellable) : base(error, cancel, autoCancellable) {
cin
DRAFT: refactoring
r144 m_task = task;
}
public void Resolve() {
if (m_task != null && LockCancelation()) {
try {
SetResult(m_task());
} 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
DRAFT: refactoring
r144 }
}
}
}
}