##// 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
cin
Promises rewritten, added improved version of AsyncQueue
r119 using System;
cin
DRAFT: refactoring
r144 using Implab.Parallels;
cin
Promises rewritten, added improved version of AsyncQueue
r119
namespace Implab {
cin
working on promises
r243 public class Promise : AbstractPromise {
cin
Added ResetState to RunnableComponent to reset in case of failure...
r205 public static readonly IPromise Success;
cin
Promises rewritten, added improved version of AsyncQueue
r119
cin
DRAFT: refactoring
r144 static Promise() {
cin
Added ResetState to RunnableComponent to reset in case of failure...
r205 Success = new SuccessPromise();
cin
Promises rewritten, added improved version of AsyncQueue
r119 }
cin
working on promises
r243 internal void ResolvePromise() {
cin
DRAFT: refactoring
r144 SetResult();
cin
Promises rewritten, added improved version of AsyncQueue
r119 }
cin
working on promises
r243 internal void RejectPromise(Exception error) {
cin
Promises rewritten, added improved version of AsyncQueue
r119 SetError(error);
cin
working on promises
r243 }
public static IPromise Reject(Exception exception) {
return new FailedPromise(exception);
}
cin
Promises rewritten, added improved version of AsyncQueue
r119 }
}