TaskCancellable

class TaskCancellable

A type that manages a collection of tasks. When the instance is deallocated, all tasks are cancelled.

Lifecycle

  • cancels all tasks when the instance is deallocated.

    Declaration

    Swift

    deinit

Internal

  • Adds a task to the collection.

    Declaration

    Swift

    func addTask(@TaskBuilder _ tasks: () -> [Task<Void, Never>])
  • Undocumented

    Declaration

    Swift

    func cancel()