Open
Description
Hi,
Thanks for creating cobalt. Feels like python asyncio but in c++.
Been trying to use generators to model results of paginated api like aws s3::list_objects.
All in all seems pretty strightforward , I can co_yeild individual response elements and co_return the last one.
But came across a corner case where api will respond with 0 elements. My outer loop is:
auto keys = s3.list_objects("test-bucket");
while (keys) {
auto key = co_await keys;
}
In python when list_objects goes out of scope simply terminates generator.
In cobalt I got the
what(): cobalt::generator returned void
Any help appreciated!
Metadata
Metadata
Assignees
Labels
No labels