##// END OF EJS Templates
Added awaiters to promises...
Added awaiters to promises Added static methods to Promise Resolve, Reject, All. Updated promise helpers

File last commit:

r248:5cb4826c2c2a v3
r248:5cb4826c2c2a v3
Show More
CancellationToken.cs
27 lines | 736 B | text/x-csharp | CSharpLexer
/ Implab / CancellationToken.cs
cin
refactoring, moving to dotnercore, simplifying promises
r240 using System;
using System.Threading;
using Implab.Parallels;
namespace Implab {
cin
Added awaiters to promises...
r248 /// <summary>
/// The cancellation token signals to the worker that cancellation has been
/// requested, after the signal is received the worker decides wheather to
/// cancel its work or to continue.
/// </summary>
public class CancellationToken : AbstractEvent<Action<Exception>> {
public CancellationToken() {
cin
refactoring, moving to dotnercore, simplifying promises
r240 }
cin
Added awaiters to promises...
r248
public void RequestCancellation() {
cin
refactoring, moving to dotnercore, simplifying promises
r240
}
cin
Added awaiters to promises...
r248 public void RequestCancellation(Exception reason) {
cin
refactoring, moving to dotnercore, simplifying promises
r240
}
cin
Added awaiters to promises...
r248 protected override void SignalHandler(Action<Exception> handler) {
throw new NotImplementedException();
}
cin
refactoring, moving to dotnercore, simplifying promises
r240 }
}