cancel(id:)
Cancel any currently in-flight operation with the given identifier.
static func cancel(id: some Hashable & Sendable)
Parameters
- id
An identifier.
Cancel any currently in-flight operation with the given identifier.
static func cancel(id: some Hashable & Sendable)
sScT22ComposableArchitectures5NeverORszACRs_rlE6cancel2idyqd___tSHRd__s8SendableRd__lFZ
What are these?646PE
An identifier.
import _Concurrency
import ComposableArchitecture
The Composable Architecture (TCA, for short) is a library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind. It can be used in SwiftUI, UIKit, and more, and on any Apple platform (iOS, macOS, tvOS, and watchOS).
@frozen struct Task<Success, Failure> where Success : Sendable, Failure : Error
A unit of asynchronous work.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
@frozen enum Never
A type that has no values and can’t be constructed.
func cancellable(id: some Hashable & Sendable, cancelInFlight: Bool = false) -> Effect<Action>
Turns an effect into one that is capable of being canceled.
static func cancel(id: some Hashable & Sendable) -> Effect<Action>
An effect that will cancel any currently in-flight effect with the given identifier.
func withTaskCancellation<T>(id: some Hashable & Sendable, cancelInFlight: Bool = false, isolation: isolated (any Actor)? = #isolation, operation: @escaping () async throws -> T) async rethrows -> T where T : Sendable
Execute an operation with a cancellation identifier.