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 client connect() method #143

Open
MaXaMaR opened this issue Apr 9, 2018 · 2 comments
Open

Async client connect() method #143

MaXaMaR opened this issue Apr 9, 2018 · 2 comments

Comments

@MaXaMaR
Copy link

MaXaMaR commented Apr 9, 2018

Currently connect() method trashes the update thread. That makes handling multiple parallel connections troublesome. For example that may be done by separating calls to update() methods in two threads - first one handles the connecting clients and the second one handles send/recv updates. However I'm not sure how correct is it to handle all connect calls in one thread as latency was high when using single thread only (3-4s single thread vs 1-2ms two update threads). Overall it would be great if connect() was async too without all-time-polling connect-only handling thread that is always active in the profiler.

TcpConnection.java:77
socket.connect(remoteAddress, timeout); // Connect using blocking mode for simplicity.

@MaXaMaR
Copy link
Author

MaXaMaR commented Apr 9, 2018

It also postpones graceful shutdown

@payne911
Copy link

@MaXaMaR About your last comment: could a postponed graceful shutdown be a possible cause for the following issue? #142

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

No branches or pull requests

2 participants