Give this a whirl... http://issues.apache.org/jira/browse/THRIFT
----- "Franis Sirkovic" <[email protected]> wrote: > Thanks, > > I have done just that (copy and modify threaded server code) and it > works. > But, I think that such code should be in the standard thrift library > (csharp > has stop flag, java has stopped_ flag). > > By the way, my first attempt was closing of transport layer > (TServerSocket). > It was unsuccessful. I have examined library again and I have found > little > problem (my opinion) in TServerSocket inheritance. TServerSocket > inherits > from TServerTransportBase and TSocketBase. close() method is inherited > from > TServerTransportBase and this method is just dummy method. Real > method > (which closes the socket) in TSocketBase is hidden. > > Can I report that as bug? And how to do that? > > Best wishes, Franis Sirkovic. > > On Mon, Feb 9, 2009 at 4:44 PM, Garrett Smith <[email protected]> wrote: > > > The Python server implementation is *very* simple and looks like it > follows > > the pattern used by other Python server implementations (inspired by > or > > using directly the SocketServer module). > > > > I do know that it responds to signals such as keyboard interrupts -- > you > > might be able to stop it via the Python signal module. > > > > Alternatively -- and I'd be inclined to take this approach as signal > is not > > consistent across platforms -- is to copy and modify the threaded > server > > code and add a 'running' flag that's set to False via a stop > method. > > > > ----- "Franis Sirkovic" <[email protected]> wrote: > > > > > Hey all, > > > > > > I need a help. I have looked at thrift python library and I > noticed a > > > difference between csharp (or java) and python libraries. I see > no > > > stop() > > > method in python servers (TSimpleServer, TThreadedServer). Is > this > > > difference result of standard python libraries (threading, > socket)? > > > I would like to be able to stop the server. Also, I would like a > > > possibility to restart a server without application restart. > > > Do you have similar requirements? > > > Do you use python servers from daemon threads? > > > > > > Best wishes, Franis Sirkovic. > >
