TaskNameProviderprotocol for customizable task naming- Built-in providers:
.keyDescription,.constant("name"),.fromKey { ... } - Composable modifiers:
.withPrefix("prefix"),.withIncrementingSuffix() TaskStorenow accepts an optionalnameProviderparameter for all task creation methods
- Built-in providers:
addImmediateTask(key:duplicateKeyBehavior:operation:)- UsesTask.immediate(Swift 6.2+, SE-0472) to start tasks synchronously on the caller's execution context until the first suspension point
Task+CancellableValueextension has been removed (not needed; use PointFree'sswift-concurrency-extraslibrary)
addConcurrentTask(key:duplicateKeyBehavior:operation:)- Runs task on global concurrent executor while still propagatingTaskLocalvaluesaddIsolatedTask(key:duplicateKeyBehavior:operation:)- Inherits caller's actor isolation (likeTask.init)
addTaskis deprecated in favor ofaddConcurrentTask
Initial release.
TaskStore<Key>- Observable container for managing keyed async tasksTaskStoreDuplicateKeyBehavior- Configurable handling for duplicate key requests:.cancelPrevious(wait:)- Cancel and optionally wait for previous task.wait- Wait for previous task to complete before starting new one.runConcurrently- Run both tasks simultaneously.preferPrevious- Keep existing task, ignore new request