You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by Nick Welch <ma...@gmail.com> on 2010/04/07 05:36:01 UTC

A Thrift server without using Thrift's main loop?

I'm using TSimpleServer in C++ and wanted to use glib's main loop
implementation, mainly for the ability to schedule other things to be
done whenever the thrift server is idle.  Is there a clean way to do
this?  My desperate solution was to hack Thrift to give outside code
access to its file descriptors, so that glib's main loop can poll
Thrift's socket and let it process a request when necessary.

I've attached my patch for the curious, but it's ugly and was the bare
minimum just to get my code doing what I wanted.

Is there a better way to achieve this?