1 #ifndef __WORKER_THREAD_H 2 #define __WORKER_THREAD_H 9 #include <condition_variable> 30 void wakeup(
bool wait =
false,
int rounds_to_wait = -1);
114 endLSN(
lsn_t::null) {}
118 void wakeup_until_lsn(
lsn_t lsn,
bool wait =
false,
int rounds_to_wait = -1);
128 #endif // __WORKER_THREAD_H Definition: worker_thread.h:12
bool is_busy() const
Definition: worker_thread.h:48
virtual ~worker_thread_t()
Definition: worker_thread.cpp:11
Definition: thread_wrapper.h:16
std::mutex cond_mutex
Definition: worker_thread.h:80
int interval_msec
Definition: worker_thread.h:92
bool worker_busy
Definition: worker_thread.h:101
long get_rounds_completed() const
Definition: worker_thread.h:44
void notify_one()
Definition: worker_thread.cpp:101
virtual ~log_worker_thread_t()
Definition: worker_thread.h:116
void notify_all()
Definition: worker_thread.cpp:106
bool wakeup_requested
Definition: worker_thread.h:98
Log Sequence Number. See Log Sequence Numbers (LSN).
Definition: lsn.h:243
std::condition_variable wakeup_condvar
Definition: worker_thread.h:82
std::atomic< bool > stop_requested
Definition: worker_thread.h:95
long rounds_completed
Definition: worker_thread.h:104
std::atomic< lsn_t > endLSN
Definition: worker_thread.h:125
void wait_for_round(long round=0)
Definition: worker_thread.cpp:36
void wakeup(bool wait=false, int rounds_to_wait=-1)
Definition: worker_thread.cpp:13
lsn_t getEndLSN()
Definition: worker_thread.h:120
std::condition_variable done_condvar
Definition: worker_thread.h:84
void stop()
Definition: worker_thread.cpp:50
log_worker_thread_t(int interval_ms=-1)
Definition: worker_thread.h:112
worker_thread_t(int inverval_ms=-1)
Definition: worker_thread.cpp:3
virtual void run()
Definition: worker_thread.cpp:60
void quit()
Definition: worker_thread.cpp:56
Definition: worker_thread.h:110
bool should_exit() const
Definition: worker_thread.h:63