Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 1.54 KB

File metadata and controls

50 lines (30 loc) · 1.54 KB

swift-task-store Releases

v0.4.0

Features

  • TaskNameProvider protocol for customizable task naming
    • Built-in providers: .keyDescription, .constant("name"), .fromKey { ... }
    • Composable modifiers: .withPrefix("prefix"), .withIncrementingSuffix()
    • TaskStore now accepts an optional nameProvider parameter for all task creation methods

v0.3.0

Features

  • addImmediateTask(key:duplicateKeyBehavior:operation:) - Uses Task.immediate (Swift 6.2+, SE-0472) to start tasks synchronously on the caller's execution context until the first suspension point

v0.2.0

Breaking Changes

  • Task+CancellableValue extension has been removed (not needed; use PointFree's swift-concurrency-extras library)

Features

  • addConcurrentTask(key:duplicateKeyBehavior:operation:) - Runs task on global concurrent executor while still propagating TaskLocal values
  • addIsolatedTask(key:duplicateKeyBehavior:operation:) - Inherits caller's actor isolation (like Task.init)

Deprecations

  • addTask is deprecated in favor of addConcurrentTask

v0.1.0

Initial release.

Features

  • TaskStore<Key> - Observable container for managing keyed async tasks
  • TaskStoreDuplicateKeyBehavior - 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