[ 
https://issues.apache.org/jira/browse/THRIFT-2441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James E. King, III updated THRIFT-2441:
---------------------------------------
    Attachment: THRIFT-2441-prelim.patch

I have attached a preview patch (not complete - for example no specific tests 
for disabling the new functionality, but passes build and test).  It may not 
apply cleanly to 0.9.2 or thrift:master as this patch was made on top of some 
other patches on the machine I generated it on, but this should be enough for 
an early preview to ensure all are happy with the direction.

Key difference from the discussion is that there is no 
interruptServerAndChildren() call, but instead there is an interruptChildren() 
call, and the TServer implementations stop() methods call interrupt() then 
interruptChildren().  If a TServerTransport doesn't support interruptChildren() 
then it will behave the way it used to.

I am also planning on taking the three per-client processing loops found in 
TSimpleServer, TThreadedServer, and TThreadPoolServer and consolidating the 
common code there (by adding a TConnectedClient class).  This would have 
simplified maintenance I needed to do on the three TServers, and will bring 
consistency to the exception handling among them.  This will be in the next 
patch / pull request.

> 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
>         Attachments: THRIFT-2441-prelim.patch
>
>
> 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)

Reply via email to