RepeatedTask

public final class RepeatedTask

Returned once a task was scheduled to be repeatedly executed on the EventLoop.

A RepeatedTask allows the user to cancel() the repeated scheduling of further tasks.

  • Try to cancel the execution of the repeated task.

    Whether the execution of the task is immediately canceled depends on whether the execution of a task has already begun. This means immediate cancellation is not guaranteed.

    The safest way to cancel is by using the passed reference of RepeatedTask inside the task closure.

    Declaration

    Swift

    public func cancel()