apple / apple/swift-async-algorithms
Future<T> type
- Dominant language
- Swift
- Stars
- 3.7k
- Forks
- 226
- Avg merge
- 10d 3h
- Merged PRs (30d)
- 1
Description
Especially when when writing tests for async code, I often find myself needing a good ol' Future type, with an API equivalent to:
```swift
final class Future: Sendable
func fulfill(_ value: T)
var value: T { get async }
}
```
Instead of copy-pasting it between projects, I'd be happy to contribute a more polished version here. Would you be interested in it?
Contributor guide
Research direction
The issue names no files or tests; start with the proposed Future API and review the repository's existing async algorithms and concurrency conventions. Confirm the intended scope with maintainers, then define completion as an agreed, polished Future implementation with appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100