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

Jonathan Heard commented on THRIFT-3447:
----------------------------------------

I've just run a few preliminary tests to see if I could replicate the behaviour 
you've described but I'm seeing a near-instant exit when stop() is called on 
TThreadPoolServer.

>From at least v0.9.1 and probably a lot longer ago, the Stop() method sets the 
>volatile stop boolean which breaks out of the while(!stop) loops in all client 
>threads as well as in the server's own Serve() loop.
As a result, all test client connections drop out with a transport exception of 
"Unable to read data from the transport connection: An existing connection was 
forcibly closed by the remote host." when they next try to read or write.

Do you have an example, or more detail about the problem you're hitting please?

> Cannot shutdown TThreadPoolServer when clients are still connected
> ------------------------------------------------------------------
>
>                 Key: THRIFT-3447
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3447
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>    Affects Versions: 0.9.1, 0.9.3
>            Reporter: Tobias Stampfl
>
> When calling Stop() on the TThreadPoolServer, Serve() is still blocking, till 
> the last client disconnected. I do not know if this is intentional, but how 
> can I stop the server without depending on the clients. Killing the Thread 
> that runs Serve() is not really what i want.
> There was a similar Bug in the C++ Library: 
> [THRIFT-2441|https://issues.apache.org/jira/browse/THRIFT-2441]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to