[ 
https://issues.apache.org/jira/browse/THRIFT-2441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14394389#comment-14394389
 ] 

Ben Craig commented on THRIFT-2441:
-----------------------------------

I approve of the direction of this patch.  

I like that you split 'interruptServerAndChildren()' into the old 'interrupt()' 
and 'interruptChildren()'.  I think that's better than what I was suggesting 
earlier.  There is still one mention of 'interruptServerAndChildren()' in the 
TServerSocket comments that you will want to fix, but in general, I'm happy 
with how this has gone.

"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."

I think this is a good idea... but I would prefer it be in a different ticket 
and patch.  That will make it easier for me (and others) to review.  When a 
patch is intended to change behavior, I like to focus on the changes to 
behavior.  When a patch is intended to clean things up, I like to focus on how 
behavior hasn't changed.  Mixing the two gets rough.

> 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