Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
work destructor calls io_service
  • Loading branch information
heifner committed Aug 25, 2020
1 parent 27dd692 commit d8363cb
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions application.cpp
Expand Up @@ -408,16 +408,18 @@ void application::set_thread_priority_max() {
}

void application::exec() {
boost::asio::io_service::work work(*io_serv);
(void)work;
bool more = true;
while( more || io_serv->run_one() ) {
while( io_serv->poll_one() ) {}
// execute the highest priority item
more = pri_queue.execute_highest();
}
{
boost::asio::io_service::work work(*io_serv);
(void)work;
bool more = true;
while( more || io_serv->run_one() ) {
while( io_serv->poll_one() ) {}
// execute the highest priority item
more = pri_queue.execute_highest();
}

shutdown(); /// perform synchronous shutdown
shutdown(); /// perform synchronous shutdown
}
io_serv.reset();
}

Expand Down

0 comments on commit d8363cb

Please sign in to comment.