[ https://issues.apache.org/jira/browse/THRIFT-3447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15030095#comment-15030095 ]
Jonathan Heard commented on THRIFT-3447: ---------------------------------------- This boils down to the use of Blocking Sockets in Thrift. It's the same problem described by many other people outside the thrift world, that you can't interrupt a socket whilst it's blocked. The unanimous answer for C# in general is to use non-blocking sockets. A work-around to the behaviour might be to get clients to regularly call a void function (such as defining a poll() function in the .thrift service definition). However this is wasteful of bandwidth and I only mention is as a possible way to achieve the desired behaviour prior to the existence of a code patch. I think this will require some significant coding effort. If I can find some time I'll look into adapting Thrift's C# lib to use async sockets - I'd welcome a 2nd opinion on this. > 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)