Skip to content

Commit

Permalink
fix: fix the bug that threads don't stop when pegasus_io_service is r…
Browse files Browse the repository at this point in the history
…eleased (#455)
  • Loading branch information
zhao liwei authored and neverchanje committed Mar 31, 2020
1 parent 51338a7 commit 2dded9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rdsn
Submodule rdsn updated 151 files
8 changes: 8 additions & 0 deletions src/reporter/pegasus_io_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ class pegasus_io_service : public ::dsn::utils::singleton<pegasus_io_service>
}
}

~pegasus_io_service()
{
ios.stop();
for (auto worker : _workers) {
worker->join();
}
}

boost::asio::io_service ios;

private:
Expand Down

0 comments on commit 2dded9b

Please sign in to comment.