0.2.0 adds explicit unstructured-task ownership for non-UI application boundaries while preserving the existing UI-focused APIs.
Highlights
- TaskingCore — a new product for non-UI targets without
MainActoror SwiftUI lifetime semantics - TaskSlot — an actor-owned replaceable task with cooperative
replace(priority:operation:),cancel(), andwaitForIdle()contracts - Shared CancellationContext — the implementation now lives in
TaskingCore; existing clients importingTaskingremain source-compatible through a public typealias - Explicit settling semantics — cancelled and superseded operations remain owned until they actually finish, and
waitForIdle()waits for all owned work
Debounce timing, retries, persistence, flush behavior, and business errors intentionally remain consumer responsibilities.
Installation
.package(url: "https://github.com/9uiLe/swift-tasking.git", from: "0.2.0")Use .product(name: "Tasking", package: "swift-tasking") for UI boundaries and .product(name: "TaskingCore", package: "swift-tasking") for non-UI task ownership.
See ADR-0010 for the ownership and cancellation trade-offs.