You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Travis Crawford <tr...@gmail.com> on 2010/07/23 10:10:59 UTC

Stopping threads question

Hey thrifty people -

Maybe a silly question, but I wasn't able to get this working with the
Runnable/Thread stuff.

What's the best way to pass a "stop" command to a thrift thread? I was
able to make a runnable class and start in a new thread, but haven't
been able to cleanly stop it. I ended up using the pthread stuff
directly, but am curious how this would work with thrift-managed
threads.

Basically I added file tailing to the scribe log server; originally I
had this working with thrift threads but couldn't figure out how to
stop them. I'd rather use the thrift stuff if there's a better
solution.

    http://github.com/traviscrawford/scribe/commit/13fe020c560f5b9dc4e6b2f69ef1286ff78c6190

Suggestions?

--travis