mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 07:25:05 -04:00
Use io_service::work in epee tcp server
This commit is contained in:
parent
31bdf7bd11
commit
4d3b61a31b
2 changed files with 14 additions and 6 deletions
|
@ -330,7 +330,16 @@ namespace net_utils
|
|||
const boost::shared_ptr<typename connection<t_protocol_handler>::shared_state> m_state;
|
||||
|
||||
/// The io_service used to perform asynchronous operations.
|
||||
std::unique_ptr<boost::asio::io_service> m_io_service_local_instance;
|
||||
struct worker
|
||||
{
|
||||
worker()
|
||||
: io_service(), work(io_service)
|
||||
{}
|
||||
|
||||
boost::asio::io_service io_service;
|
||||
boost::asio::io_service::work work;
|
||||
};
|
||||
std::unique_ptr<worker> m_io_service_local_instance;
|
||||
boost::asio::io_service& io_service_;
|
||||
|
||||
/// Acceptor used to listen for incoming connections.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue