Skip to content

Initial Release

Compare
Choose a tag to compare
@swhitty swhitty released this 01 Sep 08:24
· 26 commits to main since this release
17051a9

Usage is similar to using task groups:

let val = try await withThrowingTimeout(seconds: 1.5) {
  try await perform()
}

The provided closure is performed within a child task. If the timeout expires before a value is returned the task is cancelled and TimeoutError is thrown.