Empty generator
- Dominant language
- C++
- Stars
- 347
- Forks
- 47
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 1
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:
```c++
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
```c++
what(): cobalt::generator returned void
````
Any help appreciated!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.