application main loop use a sub thread

Signed-off-by: Fuang.Cao <cavan.cfa@gmail.com>