Make streaming thread to exit when stop request received
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 19 Mar 2019 06:45:36 +0000 (15:45 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 26 Mar 2019 07:09:47 +0000 (16:09 +0900)
Change-Id: Id772476569eafe62a300b58f5843469947a0d693

plugins/wakeup-manager/src/wakeup_audio_manager.cpp
plugins/wakeup-manager/src/wakeup_manager.cpp

index fb9ae91..ffea203 100644 (file)
@@ -307,7 +307,7 @@ void CAudioManager::streaming_thread_func(void)
 
        int index = 0;
 
-       while (1) {
+       while (!(mStopStreamingThread.load())) {
                int ret = -1;
                int cnt = 0;
 
index 2d607fd..90e68e7 100644 (file)
@@ -915,7 +915,7 @@ static void engine_data_thread_func(void)
        wakeup_speech_data speech_data;
        int index = 0;
 
-       while (1) {
+       while (!(g_engine_data_thread_should_stop.load())) {
                int ret = -1;
                int cnt = 0;