15 #ifndef IMPALA_RPC_THRIFT_THREAD_H
16 #define IMPALA_RPC_THRIFT_THREAD_H
23 #define HAVE_PTHREAD_H
25 #include <thrift/concurrency/Thread.h>
46 virtual boost::shared_ptr<apache::thrift::concurrency::Thread>
newThread(
47 boost::shared_ptr<apache::thrift::concurrency::Runnable> runnable)
const;
70 boost::shared_ptr<apache::thrift::concurrency::Runnable> runnable);
88 void RunRunnable(boost::shared_ptr<apache::thrift::concurrency::Runnable> runnable,
96 apache::thrift::concurrency::Thread::id_t
tid_;
ThriftThread(const std::string &group, const std::string &name, boost::shared_ptr< apache::thrift::concurrency::Runnable > runnable)
virtual apache::thrift::concurrency::Thread::id_t getCurrentThreadId() const
virtual id_t getId()
Returns the Thrift thread ID of the execution thread.
std::string prefix_
Thread name prefix for the Impala ThreadManager.
virtual boost::shared_ptr< apache::thrift::concurrency::Thread > newThread(boost::shared_ptr< apache::thrift::concurrency::Runnable > runnable) const
(From ThreadFactory) - creates a new ThriftThread to run the supplied Runnable.
boost::scoped_ptr< impala::Thread > impala_thread_
void RunRunnable(boost::shared_ptr< apache::thrift::concurrency::Runnable > runnable, Promise< apache::thrift::concurrency::Thread::id_t > *promise)
std::string name_
Individual thread name for the Impala ThreadManager.
apache::thrift::concurrency::Thread::id_t tid_
Thrift thread ID, set by RunRunnable.
std::string group_
Group name for the Impala ThreadManager.
virtual void join()
Joins the separate thread.
ThriftThreadFactory(const std::string &group, const std::string &prefix)
std::string group_
Group name for the Impala ThreadManager.