Skip to content

Future<T> type #342

Open
Open
@czechboy0

Description

@czechboy0

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions