From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/test/neorados/completions.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/test/neorados/completions.cc (limited to 'src/test/neorados/completions.cc') diff --git a/src/test/neorados/completions.cc b/src/test/neorados/completions.cc new file mode 100644 index 000000000..d9c0e0870 --- /dev/null +++ b/src/test/neorados/completions.cc @@ -0,0 +1,20 @@ +#include +#include +#include + +constexpr int max_completions = 10'000'000; +int completed = 0; + +boost::asio::io_context c; + +void nested_cb() { + if (++completed < max_completions) + c.post(&nested_cb); +} + +int main(void) { + c.post(&nested_cb); + c.run(); + assert(completed == max_completions); + return 0; +} -- cgit v1.2.3