execute the task in separate thread.