Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/inamiy/funasync

⏳ Collection of Swift 5.5 async/await utility functions.
https://github.com/inamiy/funasync

async async-await concurrency swift

Last synced: 3 months ago
JSON representation

⏳ Collection of Swift 5.5 async/await utility functions.

Awesome Lists containing this project

README

        

# ⏳ FunAsync

Collection of Swift 5.5 `async`/`await` utility functions.

- **Throw <-> Result conversion**
- `asyncThrowsToAsyncResult`
- `asyncResultToAsyncThrows`
- **More Concurrency helpers**
- `asyncFirst` (`Promise.race`)
- `asyncFirstSuccess` (`Promise.any`)
- `asyncAll` (`Promise.all`)
- `asyncAllSettled` (`Promise.allSettled`)
- `asyncOr` (sequential execution until first success)
- `asyncStream` (from asyncs to `AsyncStream`)
- `withRetry` (with customizability e.g. exponential backoff)
- `withTimeout` (racing with time)

## License

[MIT](LICENSE)