##// END OF EJS Templates
working on cancelation and error handling
working on cancelation and error handling

File last commit:

r144:8c0b95069066 v2
r186:75103928da09 ref20160224
Show More
Promise.cs
22 lines | 434 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
DRAFT: refactoring
r144 public class Promise : AbstractPromise, IDeferred {
public static readonly Promise SUCCESS;
cin
Promises rewritten, added improved version of AsyncQueue
r119
cin
DRAFT: refactoring
r144 static Promise() {
SUCCESS = new Promise();
SUCCESS.Resolve();
cin
Promises rewritten, added improved version of AsyncQueue
r119 }
public void Resolve() {
cin
DRAFT: refactoring
r144 SetResult();
cin
Promises rewritten, added improved version of AsyncQueue
r119 }
public void Reject(Exception error) {
SetError(error);
}
}
}