forked from such-gitea/wownero-lws
Update boost::asio usage to conform to newer standards: (#144)
* Convert boost::asio::io_service to boost::asio::io_context * Convert strand.wrap(...) to boost::asio::bind_executor(strand, ...) * Convert strand.dispatch(...) to boost::asio::dispatch(strand, ...) * Convert io_context.reset() to io_context.restart() * Convert null_buffers() usage to socket.async_wait(...) * Drop usage of GET_IO_SERVICE macro from monero * Refactor REST server to manage resources better
This commit is contained in:
committed by
Lee *!* Clagett
parent
5796dad3b8
commit
66b7497a34
@@ -1080,7 +1080,7 @@ namespace lws
|
||||
{
|
||||
// Run possible SIGINT handler
|
||||
self.io_.poll_one();
|
||||
self.io_.reset();
|
||||
self.io_.restart();
|
||||
if (self.has_shutdown())
|
||||
return {lws::error::signal_abort_process};
|
||||
|
||||
@@ -1098,7 +1098,7 @@ namespace lws
|
||||
{
|
||||
// Run possible SIGINT handler
|
||||
self.io_.poll_one();
|
||||
self.io_.reset();
|
||||
self.io_.restart();
|
||||
if (self.has_shutdown())
|
||||
return {lws::error::signal_abort_process};
|
||||
|
||||
@@ -1334,11 +1334,11 @@ namespace lws
|
||||
thread_count = std::max(std::size_t(1), thread_count);
|
||||
|
||||
/*! \NOTE Be careful about references and lifetimes of the callbacks. The
|
||||
ones below are safe because no `io_service::run()` call is after the
|
||||
ones below are safe because no `io_context::run()` call is after the
|
||||
destruction of the references.
|
||||
|
||||
\NOTE That `ctx` will need a strand or lock if multiple
|
||||
`io_service::run()` calls are used. */
|
||||
`io_context::run()` calls are used. */
|
||||
|
||||
boost::asio::steady_timer rate_timer{sync_.io_};
|
||||
class rate_updater
|
||||
|
||||
Reference in New Issue
Block a user