patch 4.0
This commit is contained in:
@ -11,41 +11,5 @@
|
||||
*/
|
||||
|
||||
#include "lib/queue/ob_lighty_queue.h"
|
||||
#include "lib/thread/thread_pool.h"
|
||||
|
||||
using oceanbase::common::LightyQueue;
|
||||
using oceanbase::lib::ThreadPool;
|
||||
|
||||
class Productor : public ThreadPool {
|
||||
public:
|
||||
Productor(LightyQueue& q, int th_cnt) : q_(q)
|
||||
{
|
||||
set_thread_count(th_cnt);
|
||||
}
|
||||
|
||||
private:
|
||||
void run1() override;
|
||||
|
||||
private:
|
||||
LightyQueue& q_;
|
||||
}; // end of class Productor
|
||||
|
||||
class Consumer : public ThreadPool {
|
||||
public:
|
||||
Consumer(LightyQueue& q, int th_cnt) : q_(q), cnt_(0)
|
||||
{
|
||||
set_thread_count(th_cnt);
|
||||
}
|
||||
|
||||
uint64_t get_cnt() const
|
||||
{
|
||||
return cnt_;
|
||||
}
|
||||
|
||||
private:
|
||||
void run1() override;
|
||||
|
||||
private:
|
||||
LightyQueue& q_;
|
||||
uint64_t cnt_;
|
||||
}; // end of class Consumer
|
||||
using oceanbase::common::ObLightyQueue;
|
||||
Reference in New Issue
Block a user