Feature #4977: Use thread instead of future to avoid android compatibility issue