talira

Queue manager for Swift on OperationQueue and GCD

open sourceMITfree

Queuer is a Swift queue manager built on OperationQueue and Dispatch (GCD). It creates asynchronous and synchronous operations, chained operations, semaphores and schedules, retries operations automatically or by hand with throttling between retries, and supports async/await operations. It builds in Swift 6 language mode and runs on Apple platforms, Linux, Android and Windows.

Problems it solves

  • run background tasks in a Swift app with a limit on how many run at once
  • retry a failing async operation in Swift automatically
  • chain several operations so each starts after the last finishes

Features

  • operation blocks, single and chained operations
  • limit concurrent operations per queue
  • semaphores and schedules
  • automatic or manual retries with throttling
  • async/await operations that retry on thrown errors

Limitations

  • Some APIs need newer Apple OS versions than the minimum deployment target (for example asyncWait needs iOS 16 or macOS 13)1

Alternatives

The same job

These do what Queuer does.

  1. Promises (Google) Promises for asynchronous code in Swift and Objective-C

Compare Queuer with the top 3