Skip to content

Future<T> type #342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
czechboy0 opened this issue Mar 3, 2025 · 0 comments
Open

Future<T> type #342

czechboy0 opened this issue Mar 3, 2025 · 0 comments

Comments

@czechboy0
Copy link

czechboy0 commented Mar 3, 2025

Especially when when writing tests for async code, I often find myself needing a good ol' Future type, with an API equivalent to:

final class Future<T: Sendable>: 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant