Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update boost::asio usage to conform to newer standards: #144

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

vtnerd
Copy link
Owner

@vtnerd vtnerd commented Oct 24, 2024

  • Convert boost::asio::io_service to boost::asio::io_context
  • Drop usage of GET_IO_SERVICE macro from monero
  • Refactor REST server to manage resources better

@vtnerd
Copy link
Owner Author

vtnerd commented Oct 24, 2024

Force pushed two more widespread updates:

  • Convert strand.wrap(...) to boost::asio::bind_executor(strand, ...)
  • Convert strand.dispatch(...) to boost::asio::dispatch(strand, ...)

There is one exception of strand.wrap(...) usage in src/rest_server.cpp because boost::bind_executor doesn't provide exact same functionality.

@vtnerd
Copy link
Owner Author

vtnerd commented Oct 25, 2024

Force pushed some more updates:

  • Convert io_context.reset() to io_context.restart()

@vtnerd
Copy link
Owner Author

vtnerd commented Oct 25, 2024

Force pushed a rebase so that the newest io_context.reset() calls are now io_context.restart().

@vtnerd
Copy link
Owner Author

vtnerd commented Oct 25, 2024

Forgot to include latest changes, trying another force push.

@vtnerd
Copy link
Owner Author

vtnerd commented Oct 25, 2024

Rebased after latest bug fixes (there were merge conflicts).

  * 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
@vtnerd
Copy link
Owner Author

vtnerd commented Oct 26, 2024

Discovered another deprecated ASIO feature in use:

  • Convert null_buffers() usage to socket.async_wait(...)

The changes have been force pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant