Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::MultiThreadTest Class Reference
Collaboration diagram for impala::MultiThreadTest:

Public Member Functions

 MultiThreadTest ()
 
void InserterThread (int arg)
 
void RemoverThread ()
 
void Run ()
 

Private Types

typedef vector< shared_ptr
< thread > > 
ThreadVector
 

Private Attributes

int iterations_
 
int nthreads_
 
BlockingQueue< int32_t > queue_
 
mutex lock_
 
map< int32_t, int > gotten_
 
ThreadVector threads_
 
int num_inserters_
 

Detailed Description

Definition at line 53 of file blocking-queue-test.cc.

Member Typedef Documentation

typedef vector<shared_ptr<thread> > impala::MultiThreadTest::ThreadVector
private

Definition at line 116 of file blocking-queue-test.cc.

Constructor & Destructor Documentation

impala::MultiThreadTest::MultiThreadTest ( )
inline

Definition at line 55 of file blocking-queue-test.cc.

Member Function Documentation

void impala::MultiThreadTest::InserterThread ( int  arg)
inline
void impala::MultiThreadTest::RemoverThread ( )
inline

Definition at line 75 of file blocking-queue-test.cc.

References impala::BlockingQueue< T >::BlockingGet(), gotten_, iterations_, lock_, and queue_.

Referenced by Run().

void impala::MultiThreadTest::Run ( )
inline

Definition at line 88 of file blocking-queue-test.cc.

References gotten_, InserterThread(), iterations_, lock_, nthreads_, RemoverThread(), and threads_.

Referenced by impala::TEST().

Member Data Documentation

map<int32_t, int> impala::MultiThreadTest::gotten_
private

Definition at line 126 of file blocking-queue-test.cc.

Referenced by RemoverThread(), and Run().

int impala::MultiThreadTest::iterations_
private

Definition at line 118 of file blocking-queue-test.cc.

Referenced by InserterThread(), RemoverThread(), and Run().

mutex impala::MultiThreadTest::lock_
private

Definition at line 122 of file blocking-queue-test.cc.

Referenced by InserterThread(), RemoverThread(), and Run().

int impala::MultiThreadTest::nthreads_
private

Definition at line 119 of file blocking-queue-test.cc.

Referenced by Run().

int impala::MultiThreadTest::num_inserters_
private

Definition at line 130 of file blocking-queue-test.cc.

Referenced by InserterThread().

BlockingQueue<int32_t> impala::MultiThreadTest::queue_
private

Definition at line 120 of file blocking-queue-test.cc.

Referenced by InserterThread(), and RemoverThread().

ThreadVector impala::MultiThreadTest::threads_
private

Definition at line 128 of file blocking-queue-test.cc.

Referenced by Run().


The documentation for this class was generated from the following file: