Skip to content

Await Queuer

Latest

Choose a tag to compare

@FabrizioBrancati FabrizioBrancati released this 15 Jul 11:53
Immutable release. Only release title and notes can be modified.
9ae00b0

Queuer 4.0.0

15 July 2026

Changed

  • Changed waitUntilAllOperationsAreFinished() to return the Queuer instance, to allow chaining - #35
  • Changed Queuer to be final and Sendable, and completion, barrier, and Scheduler handlers to be @Sendable, as required by the Swift 6 language mode - #38

Added

  • Added TestHelper with thread safe utilities to write deterministic tests on every platform - #33
  • Added syntactic sugar helpers to create and chain operations easier and faster, more info on how to use it here - #35
  • Added addBarrier(_:) and its chainable barrier(_:) variant to Queuer, to wait for all the operations currently in a queue - #35
  • Added asyncWait(_:tolerance:clock:) and syncWait(_:) to Queuer, to add wait operations to a queue - #35
  • Added onPause, onResume, and onCancel closures to ConcurrentOperation class - #37
  • Added Swift 6 language mode support with strict concurrency, the package now ships a Package@swift-6.0.swift manifest and stays compatible with Swift 5.9 and 5.10 - #38
  • Added AsyncConcurrentOperation, an Operation based on async/await with automatic retries on thrown errors and cooperative Task cancellation - #38
  • Added addChainedAsyncOperations(_:completionHandler:) and addAsyncCompletionHandler(_:) to Queuer, to chain operations with async completion handlers - #38
  • Added a Swift Testing test suite alongside the XCTest one, the XCTest suite runs on every supported toolchain, while the Swift Testing suite runs on Swift 6 and later - #38
  • Added retryDelay to ConcurrentOperation and AsyncConcurrentOperation, with its chainable retryDelay(_:) variant, to throttle automatic retries - #38
  • Added syntactic sugar for AsyncConcurrentOperation, with its fluent setters and the chainable asyncConcurrent(_:), asyncConcurrent(retries:_:), and asyncCompletion(_:) helpers on Queuer - #38
  • Added Dependabot for Swift packages and GitHub Actions dependencies, targeting the develop branch - #38
  • Added pre-commit hook #43
  • Added Makefile #43
  • Added swift-format support #43
  • Added GitHub Actions jobs for Mac Catalyst, iOS, tvOS, watchOS, visionOS, Android, and Windows - #34

Improved

  • Improved usage section in README.md file
  • Improved test suite to be deterministic, without sleeps and CI skips - #34
  • Improved GroupOperation to propagate its quality of service to the inner operations, avoiding a priority inversion while waiting for them - #35
  • Updated swift-docc-plugin to 1.4.3

Fixed

  • Fixed tests build on iOS 15, macOS 12, watchOS 8, and tvOS 15
  • Fixed ConcurrentOperation executing the block of an operation canceled before starting, it now moves directly to the finished state - #34
  • Fixed a race condition in automatic retries combined with manualFinish, where an asynchronous finish(success:) could skip an attempt and make the operation spin forever - #34
  • Fixed ConcurrentOperation burning CPU while waiting for a manual finish(success:), the thread is now parked, and protected its retry state against data races - #35
  • Fixed a crash when releasing a Scheduler created without a handler, and when calling setHandler(_:) more than once - #35
  • Fixed GroupOperation not canceling, pausing, or resuming the operations of its group - #35
  • Fixed retry() executing the block of an Operation that was never started, and executing the same attempt twice from concurrent calls - #35
  • Fixed completion handlers depending only on the last Operation added to the queue, they now wait for every Operation, and chained completions wait for their whole chain - #35
  • Fixed ConcurrentOperation without an execution block never finishing and occupying its queue forever - #35
  • Fixed automatic retries continuing after the Operation has been canceled - #35
  • Fixed finish(success:) not being idempotent, calling it twice notified the queue twice - #35