Skip to content

Commit f5651f9

Browse files
committed
Fix truncated tutorial code snippet.
1 parent 61e848d commit f5651f9

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

doc/tutorial.qbk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,11 @@ Just as it would with a call from a single thread, concurrent calls to boost::as
653653
``''''''`` boost::asio::io_context io;
654654
``''''''`` printer p(io);
655655
``''''''`` std::thread t([&]{ io.run(); });
656+
``''''''`` io.run();
657+
``''''''`` t.join();
658+
659+
``''''''`` return 0;
660+
``''''''``}
656661

657662
See the [link boost_asio.tutorial.tuttimer5.src full source listing]
658663

example/cpp11/tutorial/timer_dox.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ boost::asio::io_context::run() will continue to execute while there is "work" le
365365
do. The background thread will not exit until all asynchronous operations have
366366
completed.
367367

368+
\until join
368369
\until }
369370

370371
See the \ref tuttimer5src "full source listing" \n

0 commit comments

Comments
 (0)