##// END OF EJS Templates
fixed promise chaining behavior, the error handler doesn't handle result or cancellation handlers exceptions these exceptions are propagated to the next handlers.
fixed promise chaining behavior, the error handler doesn't handle result or cancellation handlers exceptions these exceptions are propagated to the next handlers.

File last commit:

r144:8c0b95069066 v2
r196:40d7fed4a09e default
Show More
Promise.cs
22 lines | 434 B | text/x-csharp | CSharpLexer
using System;
using Implab.Parallels;
namespace Implab {
public class Promise : AbstractPromise, IDeferred {
public static readonly Promise SUCCESS;
static Promise() {
SUCCESS = new Promise();
SUCCESS.Resolve();
}
public void Resolve() {
SetResult();
}
public void Reject(Exception error) {
SetError(error);
}
}
}