From a4339ea4b5c331cf835937488aa15c6332298df0 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 12 Mar 2026 07:00:18 +0100 Subject: [CHORE] Ran format.sh Signed-off-by: Amlal El Mahrouss --- example/asio_example/example.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'example') diff --git a/example/asio_example/example.cpp b/example/asio_example/example.cpp index 07bc62f..a03cae3 100644 --- a/example/asio_example/example.cpp +++ b/example/asio_example/example.cpp @@ -18,21 +18,23 @@ using namespace boost; int main() { - auto rope = tproc::crope("The Quick Brown Fox Jumps Over The Lazy Dog"); - auto new_elem = std::make_unique(", and Jumps again"); + auto rope = tproc::crope("The Quick Brown Fox Jumps Over The Lazy Dog"); + auto new_elem = std::make_unique(", and Jumps again"); auto new_elem_2 = std::make_unique(", and then Jumps down."); - + boost::asio::io_context ioc{1}; auto spawn_strand = boost::asio::make_strand(ioc); - - boost::asio::co_spawn(spawn_strand, [&new_elem, &new_elem_2, &rope]() -> boost::asio::awaitable { - rope.concat(new_elem.get()); - new_elem->concat(new_elem_2.get()); - - co_return; - }, boost::asio::detached); + + boost::asio::co_spawn( + spawn_strand, [&new_elem, &new_elem_2, &rope]() -> boost::asio::awaitable { + rope.concat(new_elem.get()); + new_elem->concat(new_elem_2.get()); + + co_return; + }, + boost::asio::detached); ocl::asio::run<[]() { (void)0; }>(ioc); - + std::cout << rope << std::endl; } -- cgit v1.2.3