aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vespalib/src/tests/coro/async_io/async_io_test.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/vespalib/src/tests/coro/async_io/async_io_test.cpp b/vespalib/src/tests/coro/async_io/async_io_test.cpp
index 2e783c46e6f..f20dde8b22c 100644
--- a/vespalib/src/tests/coro/async_io/async_io_test.cpp
+++ b/vespalib/src/tests/coro/async_io/async_io_test.cpp
@@ -30,8 +30,10 @@ vespalib::string impl_spec(AsyncIo &async) {
}
Detached self_exiting_run_loop(AsyncIo::SP async) {
- for (size_t i = 0; co_await async->schedule(); ++i) {
+ bool ok = co_await async->schedule();
+ for (size_t i = 0; ok; ++i) {
fprintf(stderr, "self_exiting_run_loop -> current value: %zu\n", i);
+ ok = co_await async->schedule();
}
fprintf(stderr, "self_exiting_run_loop -> exiting\n");
}