Add Join() function
parent
94c2816841
commit
f131f78d34
|
@ -24,6 +24,9 @@ void AnalysisThread::Start() {
|
|||
void AnalysisThread::Stop() {
|
||||
terminate_ = true;
|
||||
}
|
||||
void AnalysisThread::Join() {
|
||||
if (thread_.joinable()) thread_.join();
|
||||
}
|
||||
|
||||
void AnalysisThread::Run() {
|
||||
while (!(terminate_ or zm_terminate)) {
|
||||
|
|
|
@ -16,6 +16,7 @@ class AnalysisThread {
|
|||
|
||||
void Start();
|
||||
void Stop();
|
||||
void Join();
|
||||
bool Stopped() const { return terminate_; }
|
||||
|
||||
private:
|
||||
|
|
|
@ -23,6 +23,10 @@ void DecoderThread::Stop() {
|
|||
terminate_ = true;
|
||||
}
|
||||
|
||||
void DecoderThread::Join() {
|
||||
if (thread_.joinable()) thread_.join();
|
||||
}
|
||||
|
||||
void DecoderThread::Run() {
|
||||
Debug(2, "DecoderThread::Run() for %d", monitor_->Id());
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ class DecoderThread {
|
|||
|
||||
void Start();
|
||||
void Stop();
|
||||
void Join();
|
||||
|
||||
private:
|
||||
void Run();
|
||||
|
|
Loading…
Reference in New Issue