-
Notifications
You must be signed in to change notification settings - Fork 947
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
There is a change that a TCPServer may have accepted a new connection before the working thread pool started #30
Labels
Comments
zieckey
added a commit
that referenced
this issue
Apr 12, 2017
before the working thread pool started. Suppose that: Time 1 : TCPServer::listener_::Listen Time 2 : TCPServer::tpool_ is starting Time 3 : A new connection is comming Time 4 : TCPServer::HandleNewConn is invoked and we assert that tpool_ must be running that would crash So we changed the implementation of Listener::Listen() to two method : Listen() and Accept() And we invoke Listener::Listen() in TCPServer::Init() and then invoke TCPServer::Start() where we start thread pool firstly, and after the thread pool has started, we invoke Listener::Accept(). #30
zieckey
added a commit
that referenced
this issue
Apr 27, 2017
before the working thread pool started. Suppose that: Time 1 : TCPServer::listener_::Listen Time 2 : TCPServer::tpool_ is starting Time 3 : A new connection is comming Time 4 : TCPServer::HandleNewConn is invoked and we assert that tpool_ must be running that would crash So we changed the implementation of Listener::Listen() to two method : Listen() and Accept() And we invoke Listener::Listen() in TCPServer::Init() and then invoke TCPServer::Start() where we start thread pool firstly, and after the thread pool has started, we invoke Listener::Accept(). #30
zieckey
added a commit
that referenced
this issue
May 20, 2017
before the working thread pool started. Suppose that: Time 1 : TCPServer::listener_::Listen Time 2 : TCPServer::tpool_ is starting Time 3 : A new connection is comming Time 4 : TCPServer::HandleNewConn is invoked and we assert that tpool_ must be running that would crash So we changed the implementation of Listener::Listen() to two method : Listen() and Accept() And we invoke Listener::Listen() in TCPServer::Init() and then invoke TCPServer::Start() where we start thread pool firstly, and after the thread pool has started, we invoke Listener::Accept(). #30
zieckey
added a commit
that referenced
this issue
May 20, 2017
before the working thread pool started. Suppose that: Time 1 : TCPServer::listener_::Listen Time 2 : TCPServer::tpool_ is starting Time 3 : A new connection is comming Time 4 : TCPServer::HandleNewConn is invoked and we assert that tpool_ must be running that would crash So we changed the implementation of Listener::Listen() to two method : Listen() and Accept() And we invoke Listener::Listen() in TCPServer::Init() and then invoke TCPServer::Start() where we start thread pool firstly, and after the thread pool has started, we invoke Listener::Accept(). #30
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Time 1 : TCPServer::listener_::Listen
Time 2 : TCPServer::tpool_ is starting
Time 3 : A new connection is comming
Time 4 : TCPServer::HandleNewConn is invoked and we assert that
tpool_ must be running that would crash
The text was updated successfully, but these errors were encountered: