using System.Threading; using System.Threading.Tasks; namespace Swan.Threading { /// /// An interface for a worker cycle delay provider. /// public interface IWorkerDelayProvider { /// /// 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. /// /// The remaining delay to wait for in the cycle. /// Contains a reference to a task with the scheduled period delay. /// The cancellation token to cancel waiting. void ExecuteCycleDelay(int wantedDelay, Task delayTask, CancellationToken token); } }