2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-19 14:22:23 +00:00

update asio integration example

This commit is contained in:
Oliver Kowalke
2016-01-31 16:48:04 +01:00
parent 284bdf6f78
commit 3ac9dde4d0
2 changed files with 21 additions and 36 deletions

View File

@@ -118,14 +118,13 @@ int main( int argc, char* argv[]) {
std::cout << "fiber " << id << " : shutdown" << std::endl;
// stop io_service
io_svc.stop();
// interrupt acceptor fiber
// interrupt
f.interrupt();
f.detach();
std::cout << "fiber " << id << " terminates" << std::endl;
}).detach();
// run io_service
//io_svc.run();
boost::fibers::asio::run( io_svc);
f.join();
io_svc.run();
std::cout << "fiber " << id << " (main-fiber) terminates" << std::endl;
std::cout << "done." << std::endl;
return EXIT_SUCCESS;