[
https://issues.apache.org/jira/browse/THRIFT-2441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14393216#comment-14393216
]
James E. King, III commented on THRIFT-2441:
--------------------------------------------
I was able to eliminate the need for a stop() call in TServerTransport and
TServerSocket. It was sufficient to put the behavior into
TServerSocket::close(). I named it
TServerSocket::setInterruptClientsOnClose(bool). I believe we're on the same
page. There was very little change to TServerSocket. TSocket on the other
hand has a crazy complex read loop. I think I put in the right sequence of
branches to handle all the cases, but this one's going to need a lot of review
and consideration. I added some unit testing for TServerSocket into my pull
request for THRIFT-1025 and I was hoping I would be able to use that to help
test this...
> Cannot shutdown TThreadedServer when clients are still connected
> ----------------------------------------------------------------
>
> Key: THRIFT-2441
> URL: https://issues.apache.org/jira/browse/THRIFT-2441
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.9.1
> Reporter: Chris Stylianou
> Assignee: Ben Craig
>
> When calling stop() on the TThreadedServer no interrupts are sent to the
> client threads. This means the stop() call blocks on tasksMonitor.wait()
> until all client naturally disconnect.
> How can we tell the client thread connections to close/exit during the
> TThreadedServer::stop() call?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)