CancellationToken.cs
27 lines
| 736 B
| text/x-csharp
|
CSharpLexer
/ Implab / CancellationToken.cs
cin
|
r240 | using System; | |
using System.Threading; | |||
using Implab.Parallels; | |||
namespace Implab { | |||
cin
|
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
|
r240 | } | |
cin
|
r248 | ||
public void RequestCancellation() { | |||
cin
|
r240 | ||
} | |||
cin
|
r248 | public void RequestCancellation(Exception reason) { | |
cin
|
r240 | ||
} | |||
cin
|
r248 | protected override void SignalHandler(Action<Exception> handler) { | |
throw new NotImplementedException(); | |||
} | |||
cin
|
r240 | } | |
} |