mv_machine_learning: change async API behavior
[Issue type] : code refactoring
Change async API behavior of object detection task group.
In original version, async API created an internal thread which is
different from main thread because the callback function registered by
user was called by the new thread context created by the internal framework.
With this patch, user has to create a new thread for the use of async API.
Below is an simple example,
void thread_cb(...)
{
...
while (condition) {
...
mv_object_detection_get_result(handle, &number_of_objects, ...);
...
for (unsigned int idx = 0; idx < number_of_objects; ++idx) {
...
mv_object_detection_get_label(handle, idx, &label);
...
}
}
}
In addition, this patch drops the use of mutex for thread safety due to
dead lock issue. I will introduce a new thread safety solution with
more fine-grained lock approach later.
Change-Id: I7621097a7b08456d61af79ca2659546083e0ece0
Signed-off-by: Inki Dae <inki.dae@samsung.com>