0.3.0 strengthens task lifecycle safety and makes termination observable across both TaskingCore and Tasking.
Highlights
- Terminal TaskSlot teardown —
close()gracefully drains existing work, whilecancelAndWaitForIdle()closes, cancels, and waits for termination.replacenow reports whether new work was accepted. - Observable ViewTaskStore termination —
awaitCompletion(of:)andwaitForIdle()distinguish immediate UI untracking from the actual end of cancelled operations. - Release-safe error reporting —
ViewTaskStore(onUnhandledError:)exposes ownership-contract violations in release builds without changing the legacy default behavior. - Consistent duplicate policy naming — both policy types now use
.ignoreNew;ActionDuplicatePolicy.rejectWhileRunningremains available as a deprecated compatibility alias. - Clearer actor isolation —
ActionRunner.runexplicitly declaresonStartas@MainActor, matching its existing execution contract.
Installation
.package(url: "https://github.com/9uiLe/swift-tasking.git", from: "0.3.0")Existing .rejectWhileRunning construction sites continue to compile with a deprecation warning. Exhaustive switches should migrate to .ignoreNew.