Skip to content

Commit

Permalink
Fix hanging example
Browse files Browse the repository at this point in the history
  • Loading branch information
maikel committed Oct 19, 2023
1 parent 1782121 commit 7d12214
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/io_uring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ int main() {
exec::schedule_after(scheduler, 1s) | stdexec::then([] { std::cout << "Hello, 1!\n"; }),
exec::schedule_after(scheduler2, 2s) | stdexec::then([] { std::cout << "Hello, 2!\n"; }),
exec::schedule_after(scheduler, 3s) | stdexec::then([] { std::cout << "Stop it!\n"; }),
exec::schedule_after(scheduler2, 4s) | stdexec::then([&] { context.request_stop(); }),
exec::finally(exec::schedule_after(scheduler2, 4s),
stdexec::just() | stdexec::then([&] {
context.request_stop(); })),
exec::finally(
exec::schedule_after(scheduler, 4s),
stdexec::just() | stdexec::then([&] { context2.request_stop(); })),
stdexec::just() | stdexec::then([&] {
context2.request_stop();
})),
exec::schedule_after(scheduler, 10s) //
| stdexec::then([] { //
std::cout << "Hello, world!\n"; //
Expand Down

0 comments on commit 7d12214

Please sign in to comment.