Interface IWorkerDelayProvider
An interface for a worker cycle delay provider.
Namespace: Swan.Threading
Syntax
public interface IWorkerDelayProvider
Methods
ExecuteCycleDelay(Int32, Task, CancellationToken)
Suspends execution queues a new cycle for execution. The delay is given in milliseconds. When overridden in a derived class the wait handle will be set whenever an interrupt is received.
Declaration
void ExecuteCycleDelay(int wantedDelay, Task delayTask, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
Int32 | wantedDelay | The remaining delay to wait for in the cycle. |
Task | delayTask | Contains a reference to a task with the scheduled period delay. |
CancellationToken | token | The cancellation token to cancel waiting. |