| 77 | }; |
| 78 | |
| 79 | boost::asio::experimental::coro<int> generator_impl( |
| 80 | boost::asio::any_io_executor, int& last, bool& destroyed) |
| 81 | { |
| 82 | on_scope_exit x = [&]() noexcept { destroyed = true; }; |
| 83 | (void)x; |
| 84 | |
| 85 | int i = 0; |
| 86 | while (true) |
| 87 | { |
| 88 | last = ++i; |
| 89 | co_yield last; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | boost::asio::awaitable<void> generator_test() |
| 94 | { |