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

Add option to use async writes on the transport #185

Open
xhou-wavefin opened this issue Apr 25, 2018 · 2 comments
Open

Add option to use async writes on the transport #185

xhou-wavefin opened this issue Apr 25, 2018 · 2 comments

Comments

@xhou-wavefin
Copy link

I'm wondering why you use sync write operation in publishing?

https://github.com/crossbario/autobahn-cpp/blob/master/autobahn/wamp_rawsocket_transport.ipp#L153

The reason I ask is that we get into a problem that our only thread is stuck on this sync write operation around sleep time.

@oberstet
Copy link
Contributor

we could easily have an user option to do writes async (PRs welcome;) (https://www.boost.org/doc/libs/1_67_0/doc/html/boost_asio/reference/async_write.html)

I guess there will be scenarios (many small messages) where it (async write) might have a performance impact. so IMO it should be an option.

@oberstet oberstet changed the title Why using sync write in publish Add option to use async writes on the transport Apr 26, 2018
@nlyan
Copy link

nlyan commented Apr 27, 2018

Bonefish is doing the same thing....

https://github.com/tplgy/bonefish/blob/master/src/bonefish/rawsocket/tcp_connection.hpp#L78

This really isn't good.

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

No branches or pull requests

3 participants