22 #ifndef Hypertable_Lib_TableScannerQueue_h
23 #define Hypertable_Lib_TableScannerQueue_h
29 #include <condition_variable>
53 std::lock_guard<std::mutex> lock(
m_mutex);
66 std::unique_lock<std::mutex> lock(
m_mutex);
78 m_cond.wait(lock, [
this](){
98 std::lock_guard<std::mutex> lock(
m_mutex);
103 void set_error(
int error,
const std::string &error_msg) {
104 std::lock_guard<std::mutex> lock(
m_mutex);
128 #endif // Hypertable_Lib_TableScannerQueue_h
Provides application work queue and worker threads.
void next_result(ScanCellsPtr &cells, int *error, std::string &error_msg)
void set_error(int error, const std::string &error_msg)
std::shared_ptr< TableScannerQueue > TableScannerQueuePtr
Shared smart pointer to TableScannerQueue.
std::list< ApplicationHandler * > WorkQueue
virtual void add(ApplicationHandler *app_handler)
Adds an application handler to queue.
std::shared_ptr< ScanCells > ScanCellsPtr
Smart pointer to ScanCells.
std::list< ScanCellsPtr > CellsQueue
TableScannerQueue()
Default constructor.
virtual void add_unlocked(ApplicationHandler *app_handler)
Adds an application handler to queue without locking.
virtual void run()=0
Carries out the request.
void add_cells(ScanCellsPtr &cells)
Base clase for application handlers.
Declarations for ApplicationQueueInterface.
std::condition_variable m_cond
Abstract interface for application queue.