Skip to content

[C++] Create AsyncGenerator from Future<AsyncGenerator<T>> #28092

Description

@asfimport

This is useful for doing things like...

Future vec_fut = GetVectorOfThingsAsync();

Future<AsyncGenerator> gen_fut = vec_fut.Then([] (const SomeVector& vec) { return MakeVectorGenerator(vec); };

AsyncGenerator item_gen = MakeFutureFirstGenerator(gen_fut);

The cost of the initial future is just part of the cost of getting the first item from the generator.

Reporter: Weston Pace / @westonpace
Assignee: Weston Pace / @westonpace

PRs and other links:

Note: This issue was originally created as ARROW-12286. Please see the migration documentation for further details.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions