##// END OF EJS Templates
working on promises
working on promises

File last commit:

r243:b1e0ffdf3451 v3
r243:b1e0ffdf3451 v3
Show More
Promise.cs
25 lines | 539 B | text/x-csharp | CSharpLexer
using System;
using Implab.Parallels;
namespace Implab {
public class Promise : AbstractPromise {
public static readonly IPromise Success;
static Promise() {
Success = new SuccessPromise();
}
internal void ResolvePromise() {
SetResult();
}
internal void RejectPromise(Exception error) {
SetError(error);
}
public static IPromise Reject(Exception exception) {
return new FailedPromise(exception);
}
}
}