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

async_resolve endpoint overload is blocking on Windows #73

Closed
sweatybridge opened this issue Dec 10, 2017 · 5 comments
Closed

async_resolve endpoint overload is blocking on Windows #73

sweatybridge opened this issue Dec 10, 2017 · 5 comments

Comments

@sweatybridge
Copy link

I ran into this problem while trying to do multiple reverse lookups simultaneously. Each lookup is using a unique instance of endpoint::resolver. However, the resolution did not happen asynchronously. A similar problem has been posted on the user list back in 2014: https://lists.boost.org/boost-users/2014/12/83445.php

May I suggest that we update the documentation so that software engineers are aware of such issues in the future?
http://www.boost.org/doc/libs/1_64_0/doc/html/boost_asio/reference/ip__basic_resolver/async_resolve/overload2.html

@vinniefalco
Copy link
Member

vinniefalco commented Dec 11, 2017

But the documentation already states that asynchronous name resolutions on Windows are simulated using a per-io-service thread that the asio implementation provides. Is that insufficient?

@sweatybridge
Copy link
Author

That would indeed be sufficient. But I was not able to find that statement anywhere. Are we possibly looking at different documentation pages?

@vinniefalco
Copy link
Member

vinniefalco commented Dec 11, 2017

See Windows NT, 2000, XP, 2003, Vista, 7 and 8

http://www.boost.org/doc/libs/1_65_1/doc/html/boost_asio/overview/implementation.html#boost_asio.overview.implementation.windows_nt__2000__xp__2003__vista__7_and_8

  • An additional thread per io_service is used to emulate asynchronous host resolution. This thread is created on the first call to either ip::tcp::resolver::async_resolve() or ip::udp::resolver::async_resolve().

Seems like you have not yet committed the entirety of the Boost.Asio documentation to memory :)

@sweatybridge
Copy link
Author

:) that and also I've not tried enough permutations of search terms.

@vinniefalco
Copy link
Member

Check out Boost.Beast, HTTP and WebSocket using Boost.Asio:
https://github.com/boostorg/beast

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

No branches or pull requests

2 participants