You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Weston Pace (Jira)" <ji...@apache.org> on 2021/04/08 01:13:00 UTC

[jira] [Created] (ARROW-12286) [C++] Create AsyncGenerator from Future>

Weston Pace created ARROW-12286:
-----------------------------------

             Summary: [C++] Create AsyncGenerator from Future<AsyncGenerator<T>>
                 Key: ARROW-12286
                 URL: https://issues.apache.org/jira/browse/ARROW-12286
             Project: Apache Arrow
          Issue Type: Sub-task
          Components: C++
            Reporter: Weston Pace


This is useful for doing things like...

Future<ItemVector> vec_fut = GetVectorOfThingsAsync();

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

AsyncGenerator<Item> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)