Skip to content

Releases: swhitty/Awaiting

Swift 6 Language Mode

22 Oct 21:56
435c0e7
Compare
Choose a tag to compare
  • Adopts Swift 6 language mode when using Swift 6 compiler

  • Uses Swift Testing when available (Swift 6 compiler)

  • Updates internal lock to swift-mutex.

  • Drops support for Swift 5.8 and earlier. Swift 5.9 is now the minimum support compiler.

Element where predicate passes

23 Apr 03:06
96d3371
Compare
Choose a tag to compare

Adds new method to wrapped Collection where an element passes a predicate

@Awaiting var numbers = [Int]()

// suspends until a multiple of 7 is appended to the array e.g. `numbers.append(21)`
let value: Int = try await $numbers.element(where: { $0.isMultiple(of: 7) })

Equatable Waiter

22 Mar 06:59
385bdd6
Compare
Choose a tag to compare

Adds a specialized waiters for Equatable elements:

@Awaiting var name: String?

// Suspends until name == "Fish"
try await $name.equals("Fish")

Modify

19 Dec 21:53
8697bb2
Compare
Choose a tag to compare

Adds func modify() that allows the property to be mutated using the inner lock and then notifying all waiters once the mutation is complete.

@Awaiting.Waiter is Sendable

21 Oct 02:06
9e59ac1
Compare
Choose a tag to compare

@Awaiting.Waiter is threadsafe and should be Sendable

Swift 5.7

17 Sep 22:37
37d435d
Compare
Choose a tag to compare

minor update to fix concurrency warnings within Swift 5.7

Specialized Waiter

10 Aug 08:29
041d453
Compare
Choose a tag to compare

Adds some specialized waiters for collections and optionals:

@Awaiting var name: String?

// Suspends until name != nil
let name = try await $name.some()
@Awaiting var entries = [String]()

// Suspends until entries[2] exists
let entry = try await $entries.value(at: 2)

Initial Release

29 Jan 04:19
f320fe1
Compare
Choose a tag to compare