Remove unnecessary sub thread checking logic 12/302112/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Thu, 30 Nov 2023 10:03:20 +0000 (19:03 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Thu, 30 Nov 2023 10:03:20 +0000 (19:03 +0900)
- Issue:
Sometimes tts_destroy() is delayed without any reason.

- Solution:
This patch removes unncessary logic for checking active ecore sub
thread. In old version, tts.c module makes a sub thread for some reason
so the framework should check the active subthread for safe handle
destroy. However, since tizen 7.0, tts.c module does not make a sub
thread any more. And only the tts_core.c makes some sub thread and those
sub threads are completely controlled by the framework. So the checking
logic in tts.c is unncessary now.

Change-Id: I5f2ea8aa16f65e82e94332c046ae74ffba569f78
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/tts.c

index c47ef85c0596812f2d9dcbbb7b77fec55847a8f2..5bb7037369c4c2d37552685b99eecb02cee22fba 100644 (file)
@@ -299,17 +299,6 @@ static int destroy_tts_handle(tts_h tts)
                /* Unset registered callbacks */
                tts_client_unset_all_cb(client);
 
-               int thread_count = ecore_thread_active_get();
-               SLOG(LOG_INFO, TAG_TTSC, "[INFO] Active thread count: %d", thread_count);
-               for (int cnt = 0; 0 < thread_count; cnt++) {
-                       usleep(50000);
-                       if (30 == cnt) {
-                               SLOG(LOG_WARN, TAG_TTSC, "[WARNNING] Thread is blocked, %d", thread_count);
-                               break;
-                       }
-                       thread_count = ecore_thread_active_get();
-               }
-
                if (0 != tts_ipc_close_connection(uid)) {
                        SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to close connection");
                        return TTS_ERROR_OPERATION_FAILED;