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

James E. King, III commented on THRIFT-2441:
--------------------------------------------

In each of the three threaded servers we call process() then we call peek().  
Can someone describe why the peek is needed?  It would seem to me that 
process() will be sufficient as it will go fetch the next message from the 
connection if it's there.  Is calling peek() an inefficiency we can remove from 
these?

Motivation here is that if it cannot be removed then I need to perform a select 
on the recv(MSG_PEEK) in TSocket::peek() too, which means every loop through a 
message is guaranteed to be poll/recv(peek)/poll/recv(noflags).

> 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