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