[BUG] Fix the bug caused by a non-terminated thread in destructor
authorDongju Chae <dongju.chae@samsung.com>
Fri, 6 Sep 2019 03:41:08 +0000 (12:41 +0900)
committer함명주/On-Device Lab(SR)/Principal Engineer/삼성전자 <myungjoo.ham@samsung.com>
Mon, 9 Sep 2019 08:03:45 +0000 (17:03 +0900)
commit8bd7f2f5f604f41e372a43bc50d8db69599cff8d
tree195d2f5adc0325bb81583570789b7546bcdc90ad
parentd941bc16b0f525a2d5e55a581e241327b806dbc0
[BUG] Fix the bug caused by a non-terminated thread in destructor

This commit fixes the bug in `ne-host-input-service.c`.

Sometimes, `cb_thread` is not terminiated until the destructor is called.
In this case, `pthread_cond_destroy()` generates unexpected bugs because cb_thread is still using this cond (e.g., `pthread_cond_broadcast()` at exit).
So, the destructor needs to make sure that `cb_thread` is terminated or not.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
src/core/ne-host-input-service.c