From 27a3b61f59f4cc12c4bc1bff52130ccbe8103270 Mon Sep 17 00:00:00 2001 From: goldenhawking Date: Sun, 7 Feb 2021 16:31:01 +0800 Subject: [PATCH] terminate thread in win-10 --- uhd_cpp/uhd_spectrum/stdout_watcher.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uhd_cpp/uhd_spectrum/stdout_watcher.cpp b/uhd_cpp/uhd_spectrum/stdout_watcher.cpp index 33479f5..d8d5ef5 100644 --- a/uhd_cpp/uhd_spectrum/stdout_watcher.cpp +++ b/uhd_cpp/uhd_spectrum/stdout_watcher.cpp @@ -22,7 +22,9 @@ void stdout_watcher::stop_and_wait() m_bStop = true; fprintf (stdout,"Bye!\n"); fprintf (stderr,"Bye!\n"); - wait(); + for (int i=0;i<10;++i) + wait(200); + this->terminate(); } #ifdef Q_OS_WINDOWS -- GitLab