##// END OF EJS Templates
missing files
missing files

File last commit:

r244:eee3e49dd1ff v3
r246:5aa9cfbe56c3 v3
Show More
FuncTask.cs
23 lines | 634 B | text/x-csharp | CSharpLexer
cin
DRAFT: refactoring
r144 using System;
using System.Threading;
namespace Implab {
cin
working on promises
r244 public class FuncTask<T> : FuncTaskBase<T>, IResolvable {
cin
DRAFT: refactoring
r144 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 }
}
}
}
}